/**
 * SaaS shell — front + admin shared layer
 * Depends on tokens in style.css (:root)
 */

/* ---------- Typography scale ---------- */
.saas-display {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink-950);
}
.saas-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-light);
  max-width: 36rem;
}
.saas-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.saas-section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}
.saas-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-950);
  margin: 0.35rem 0 0.65rem;
}
.saas-section-head p {
  color: var(--text-light);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- CTAs ---------- */
.btn.btn-cta,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 0.95rem;
  background: var(--cta, var(--primary));
  color: #fff !important;
  border: none;
  box-shadow: 0 8px 24px -10px rgba(0, 82, 217, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn.btn-cta:hover,
.btn-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(0, 62, 179, 0.5);
  color: #fff !important;
}
.btn.btn-cta-ghost,
.btn-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  background: transparent;
  color: var(--ink-800) !important;
  border: 1px solid var(--border);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.btn.btn-cta-ghost:hover,
.btn-cta-ghost:hover {
  background: var(--primary-soft);
  border-color: rgba(0, 82, 217, 0.25);
  color: var(--primary-dark) !important;
}

/* ---------- Navbar SaaS ---------- */
body .navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
body .navbar.is-scrolled {
  box-shadow: 0 8px 30px -18px rgba(6, 16, 31, 0.35);
}
body .navbar .nav-menu a {
  color: var(--ink-700) !important;
  font-weight: 500;
}
body .navbar .nav-menu a:hover,
body .navbar .nav-menu a.active {
  color: var(--primary) !important;
}
body .navbar .nav-user a {
  color: var(--ink-700) !important;
}
body .navbar .nav-cta-download {
  margin-left: 4px;
  padding: 0.45rem 0.95rem !important;
  border-radius: 999px;
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 650 !important;
  font-size: 0.875rem !important;
  box-shadow: 0 6px 18px -8px rgba(0, 82, 217, 0.55);
}
body .navbar .nav-cta-download:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}
body .navbar .nav-dropdown-menu {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
body .navbar .nav-dropdown-menu a {
  color: var(--ink-800) !important;
}

/* ---------- Trust strip ---------- */
.saas-trust {
  background: var(--trust-bg, var(--primary-soft));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.saas-trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.saas-trust-item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-950);
  letter-spacing: -0.02em;
}
.saas-trust-item span {
  font-size: 0.8rem;
  color: var(--text-light);
}
@media (max-width: 768px) {
  .saas-trust-inner { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Reveal motion ---------- */
[data-saas-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
[data-saas-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Footer tighten ---------- */
body .footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.78);
}
body .footer a { color: rgba(255, 255, 255, 0.78); }
body .footer a:hover { color: #fff; }
body .footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

/* ---------- Auth pages ---------- */
body.auth-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--primary-soft), transparent),
    var(--bg);
}
body.auth-page .auth-box {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
}
body.auth-page .auth-box h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
body.auth-page .btn-primary {
  border-radius: var(--radius-sm);
  font-weight: 650;
}

/* ---------- Download page ---------- */
body.page-download .dl-hero {
  background:
    linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
body.page-download .dl-hero h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink-950);
}
body.page-download .dl-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface, #fff);
  box-shadow: 0 10px 30px -22px rgba(6, 16, 31, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
body.page-download .dl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ---------- Profile / user center web ---------- */
.page-profile .card,
body .card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px -20px rgba(6, 16, 31, 0.28);
}

/* ---------- Admin light shell ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.admin-sidebar {
  background: var(--surface, #fff);
  color: var(--ink-800);
  border-right: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-950);
  letter-spacing: -0.02em;
}
.admin-sidebar .brand a {
  color: inherit;
  text-decoration: none;
}
.admin-sidebar .section-title {
  padding: 1rem 1.25rem 0.35rem;
  font-size: 0.68rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}
.admin-sidebar ul { list-style: none; margin: 0; padding: 0 0.5rem 0.35rem; }
.admin-sidebar ul li a {
  display: block;
  padding: 0.55rem 0.75rem;
  color: var(--ink-700);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.55rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-sidebar ul li a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.admin-sidebar ul li a.active {
  background: var(--primary);
  color: #fff;
}
.admin-main-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar .admin-topbar-title {
  font-weight: 650;
  color: var(--ink-900);
  font-size: 0.95rem;
}
.admin-topbar .admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.admin-topbar a {
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--ink-700);
}
.admin-content {
  padding: 1.5rem 1.5rem 2.5rem;
  background: var(--bg);
  min-width: 0;
}
.admin-page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.admin-page-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-950);
  margin: 0;
}
.admin-table {
  background: var(--surface, #fff);
  border-radius: var(--radius-sm);
  overflow: auto;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -20px rgba(6, 16, 31, 0.25);
}
.admin-table table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--gray-50);
  font-weight: 650;
  font-size: 0.78rem;
  color: var(--gray-500);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--ink-800);
  vertical-align: middle;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: var(--surface, #fff);
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -20px rgba(6, 16, 31, 0.25);
}
.admin-stat-card .num {
  font-size: 1.65rem;
  font-weight: 750;
  color: var(--primary);
  letter-spacing: -0.03em;
}
.admin-stat-card .label {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.admin-filters,
.admin-toolbar {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.admin-content .btn,
.admin-content .btn-sm {
  border-radius: 0.55rem;
  font-weight: 600;
}
.admin-content .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.admin-content .btn-primary:hover {
  background: var(--primary-dark);
}
.admin-content .form-group label,
.admin-content label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-700);
}
.admin-content input[type="text"],
.admin-content input[type="email"],
.admin-content input[type="password"],
.admin-content input[type="number"],
.admin-content input[type="date"],
.admin-content input[type="datetime-local"],
.admin-content select,
.admin-content textarea {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
}
.admin-content .modal,
.admin-content [class*="modal"] {
  border-radius: var(--radius-sm);
}
@media (max-width: 960px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Home product overrides (SaaS) ---------- */
body.page-home-product .hero-product.hero-showcase {
  min-height: auto;
  padding: 2.75rem 0 2rem;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(0, 82, 217, 0.12), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
body.page-home-product .hero-brand {
  margin-bottom: 0.75rem;
}
body.page-home-product .hero-brand-zh {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-950);
}
body.page-home-product .hero-brand-en {
  font-weight: 600;
  color: var(--primary);
  margin-left: 0.4rem;
}
body.page-home-product .hero-lead {
  font-size: clamp(1.65rem, 3.4vw, 2.6rem);
  letter-spacing: -0.035em;
  max-width: 18ch;
}
body.page-home-product .hero-sub {
  max-width: 34rem;
  color: var(--text-light);
}
body.page-home-product .hero-os-row {
  margin-top: 0.85rem;
}
body.page-home-product .product-rail {
  display: none; /* trust strip replaces cluttered rail under hero */
}
body.page-home-product .product-cap-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
body.page-home-product .product-cap-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 1rem 1.05rem;
  box-shadow: none;
}
body.page-home-product .product-cap-card:hover {
  border-color: rgba(0, 82, 217, 0.28);
  box-shadow: 0 12px 28px -20px rgba(6, 16, 31, 0.35);
}

/* ---------- Forum pro soften ---------- */
.forum-board-grid,
.board-list,
.boards-grid {
  gap: 0.85rem !important;
}
.forum-board-card,
.board-card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  background: #fff !important;
}
.thread-list .thread-item,
.thread-item {
  border-bottom: 1px solid var(--gray-100);
  padding: 0.85rem 0.25rem;
}
.forum-toolbar .btn-primary,
.board-header .btn-primary {
  border-radius: var(--radius-sm);
  font-weight: 650;
}


/* FORCE LIGHT SAAS HOME */

/* FORCE LIGHT SAAS HOME — beats page-home-product dark theme */
body.page-home-product .navbar,
body.page-home-product #site-navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(27, 51, 86, 0.1) !important;
  color: #06101f !important;
  box-shadow: 0 1px 0 rgba(6, 16, 31, 0.04);
}
body.page-home-product .navbar .nav-menu a,
body.page-home-product .navbar .nav-user a {
  color: #1b3356 !important;
}
body.page-home-product .navbar .nav-menu a.active,
body.page-home-product .navbar .nav-menu a:hover {
  color: #0052d9 !important;
}
body.page-home-product .navbar .nav-cta-download {
  background: #0052d9 !important;
  color: #fff !important;
}

body.page-home-product .hero.hero-showcase,
body.page-home-product .hero-product.hero-showcase,
body.page-home-product section.hero-showcase {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%) !important;
  min-height: auto !important;
  padding: 48px 0 36px !important;
  color: #06101f !important;
}
body.page-home-product .hero-showcase-bg,
body.page-home-product .hero-showcase-bg::after {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

body.page-home-product .hero-showcase .hero-brand,
body.page-home-product .hero-showcase .hero-brand-zh,
body.page-home-product .hero-showcase .hero-brand-en,
body.page-home-product .hero-showcase .hero-lead,
body.page-home-product .hero-showcase .hero-sub {
  color: #06101f !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
body.page-home-product .hero-showcase .hero-brand-en {
  color: #0052d9 !important;
}
body.page-home-product .hero-showcase .hero-sub {
  color: #475569 !important;
}

body.page-home-product .hero-showcase .hero-os-chip {
  border: 1px solid rgba(27, 51, 86, 0.12) !important;
  background: #fff !important;
  color: #1b3356 !important;
}
body.page-home-product .hero-showcase .hero-os-chip.is-soon {
  opacity: 0.55;
}
body.page-home-product .hero-showcase .hero-dot {
  background: rgba(0, 82, 217, 0.25) !important;
}
body.page-home-product .hero-showcase .hero-dot.is-active {
  background: #0052d9 !important;
}

body.page-home-product .hero-showcase .btn-ghost,
body.page-home-product .hero-showcase .btn-cta-ghost {
  background: #fff !important;
  color: #1b3356 !important;
  border: 1px solid rgba(27, 51, 86, 0.14) !important;
}
body.page-home-product .saas-trust {
  display: block !important;
}

/* language switcher on light nav */
body.page-home-product .navbar .lang-switch,
body.page-home-product .navbar .ac-lang-switch {
  color: #1b3356 !important;
}


/* nav v9 shell override */
body .navbar .nav-cta-download {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}
body .navbar .ac-lang-btn,
body .navbar .ac-lang-btn-nav {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}


/* nav logo transparent v11 */
body .navbar .nav-brand-mark {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
