:root {
  --app-ink: #162238;
  --app-muted: #66748b;
  --app-line: #e5eaf1;
  --app-surface: #ffffff;
  --app-bg: #f4f7fb;
  --app-primary: #2457d6;
  --app-primary-dark: #153b9d;
}

body.app-shell {
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-ink);
}

.app-navbar {
  border-bottom: 1px solid rgba(26, 46, 79, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--app-ink);
}

.app-brand:hover {
  color: var(--app-ink);
}

.app-brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.8rem;
  background: linear-gradient(145deg, var(--app-primary), #4d7df0);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 20px rgba(36, 87, 214, 0.24);
}

.app-brand strong,
.app-brand small {
  display: block;
}

.app-brand strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.app-brand small {
  color: var(--app-muted);
  font-size: 0.7rem;
}

.app-navbar .nav-link {
  border-radius: 0.65rem;
  color: #526077;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem !important;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  background: #edf3ff;
  color: var(--app-primary);
}

.app-user-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #dce5f3;
  border-radius: 0.65rem;
  background: #f6f9ff;
  color: #526077;
  font-size: 0.78rem;
  padding: 0.48rem 0.7rem;
  white-space: nowrap;
}

.app-user-badge-label {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.app-user-badge strong {
  color: var(--app-primary-dark);
  font-weight: 800;
}

.app-main {
  min-height: calc(100vh - 150px);
  padding: 2rem 0 4rem;
}

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 18rem;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 90% 15%, rgba(107, 147, 255, 0.6), transparent 32%),
    linear-gradient(135deg, #173b91 0%, #2457d6 62%, #3874ef 100%);
  color: #fff;
  padding: 3rem;
  box-shadow: 0 22px 50px rgba(29, 70, 168, 0.22);
}

.dashboard-hero::after {
  position: absolute;
  width: 17rem;
  height: 17rem;
  right: -5rem;
  bottom: -8rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.dashboard-hero h1 {
  max-width: 36rem;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.dashboard-hero p {
  max-width: 35rem;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-actions .btn {
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.8rem 1.1rem;
}

.hero-status {
  display: flex;
  min-width: 15rem;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  background: rgba(12, 32, 79, 0.28);
  padding: 1rem 1.1rem;
  backdrop-filter: blur(12px);
}

.hero-status strong,
.hero-status small {
  display: block;
}

.hero-status strong {
  font-size: 0.85rem;
}

.hero-status small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: #62e6a5;
  box-shadow: 0 0 0 5px rgba(98, 230, 165, 0.15);
}

.dashboard-section {
  margin-top: 3rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--app-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.workspace-card {
  display: flex;
  min-height: 9.5rem;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--app-line);
  border-radius: 1.15rem;
  background: var(--app-surface);
  color: var(--app-ink);
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.workspace-card:hover {
  border-color: #b9c9ed;
  color: var(--app-ink);
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(41, 65, 107, 0.1);
}

.workspace-icon {
  display: grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.9rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.workspace-icon-blue { background: #e8f0ff; color: #2759d2; }
.workspace-icon-green { background: #e5f8ef; color: #14845a; }
.workspace-icon-purple { background: #f0eaff; color: #7043c5; }
.workspace-icon-orange { background: #fff0df; color: #ba6415; }
.workspace-icon-slate { background: #e9eef5; color: #445670; }

.workspace-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.workspace-meta {
  margin-bottom: 0.35rem;
  color: #9aa5b6;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.workspace-card strong {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.workspace-card small {
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.workspace-arrow {
  color: #aab4c4;
  font-size: 1.15rem;
  transition: color 160ms ease, transform 160ms ease;
}

.workspace-card:hover .workspace-arrow {
  color: var(--app-primary);
  transform: translateX(3px);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: var(--app-surface);
}

.quick-actions a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-right: 1px solid var(--app-line);
  color: var(--app-ink);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 1rem;
  text-decoration: none;
}

.quick-actions a:last-child {
  border-right: 0;
}

.quick-actions a:hover {
  background: #f8faff;
  color: var(--app-primary);
}

.quick-actions span {
  color: #9aa6b8;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.help-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid #dce6f7;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #f7faff, #edf3ff);
  padding: 2.5rem;
}

.help-hero h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.help-hero p {
  max-width: 42rem;
  margin: 0;
  color: var(--app-muted);
  line-height: 1.7;
}

.help-version {
  min-width: 8rem;
  border: 1px solid #d5e1f6;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.2rem;
  text-align: center;
}

.help-version span,
.help-version strong {
  display: block;
}

.help-version span {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.help-version strong {
  margin-top: 0.2rem;
  color: var(--app-primary);
}

.help-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.help-shortcuts a {
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: #fff;
  color: #526077;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
}

.help-shortcuts a:hover,
.help-card a:hover {
  color: var(--app-primary);
}

.help-section {
  margin-top: 3rem;
}

.help-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  counter-reset: help-step;
  list-style: none;
}

.help-steps li {
  position: relative;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: #fff;
  padding: 3.3rem 1.1rem 1.1rem;
  counter-increment: help-step;
}

.help-steps li::before {
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 0.55rem;
  background: #eaf1ff;
  color: var(--app-primary);
  content: counter(help-step);
  font-size: 0.72rem;
  font-weight: 800;
}

.help-steps strong,
.help-steps span {
  display: block;
}

.help-steps strong {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.help-steps span {
  color: var(--app-muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.help-card {
  scroll-margin-top: 6rem;
  border: 1px solid var(--app-line);
  border-radius: 1.15rem;
  background: #fff;
  padding: 1.4rem;
}

.help-card-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 0.8rem;
  background: #eaf1ff;
  color: var(--app-primary);
  font-size: 1.35rem;
}

.help-card h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.help-card p,
.help-card li,
.help-faq .accordion-body {
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.help-card ul {
  padding-left: 1.15rem;
}

.help-card a {
  color: var(--app-primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.help-faq .accordion-item {
  overflow: hidden;
  border-color: var(--app-line);
}

.help-faq .accordion-button {
  color: var(--app-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.help-faq .accordion-button:not(.collapsed) {
  background: #f3f7ff;
  color: var(--app-primary-dark);
}

.app-footer {
  border-top: 1px solid var(--app-line);
  background: #fff;
  color: #8793a5;
  font-size: 0.72rem;
  padding: 1.25rem 0;
}

.app-footer-content,
.app-footer-meta {
  align-items: center;
  display: flex;
}

.app-footer-content {
  justify-content: space-between;
}

.app-footer-product,
.app-footer-meta strong {
  color: #5f6d82;
  font-weight: 700;
}

.app-footer-meta {
  gap: 1rem;
}

.app-footer-meta span + span {
  border-left: 1px solid var(--app-line);
  padding-left: 1rem;
}

@media (max-width: 991px) {
  .app-navbar .navbar-collapse {
    border-top: 1px solid var(--app-line);
    margin-top: 0.8rem;
    padding-top: 0.7rem;
  }

  .dashboard-hero {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 2rem;
  }

  .hero-status {
    min-width: 0;
    width: 100%;
  }

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

  .quick-actions a:nth-child(2) {
    border-right: 0;
  }

  .quick-actions a:nth-child(-n+2) {
    border-bottom: 1px solid var(--app-line);
  }

  .help-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .app-footer-content,
  .app-footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-footer-content {
    gap: 0.5rem;
  }

  .app-footer-meta {
    gap: 0.25rem;
  }

  .app-footer-meta span + span {
    border-left: 0;
    padding-left: 0;
  }

  .app-main {
    padding-top: 1rem;
  }

  .help-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem;
  }

  .help-version {
    width: 100%;
    text-align: left;
  }

  .help-grid,
  .help-steps {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    border-radius: 1rem;
    padding: 1.5rem;
  }

  .dashboard-hero h1 {
    font-size: 2rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .quick-actions a {
    border-right: 0;
    border-bottom: 1px solid var(--app-line);
  }

  .quick-actions a:last-child {
    border-bottom: 0;
  }
}
