/* ================================================================
   金石量化 - 客户端/公开页面样式 (Client)
   从 index.html, client_login.html, client_dashboard.html 内联样式提取
   ================================================================ */

/* =================================================================
   首页 (index.html) — Hero + Features + AI + Flow + Highlights + CTA
   ================================================================= */

/* Nav overrides for index page */
.nav-index {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand-index {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--text);
}
.nav-brand-index .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #2080f0, #6366f1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.nav-link-index {
  font-size: 14px; color: var(--text-secondary);
  padding: 6px 14px; border-radius: 6px;
  transition: all .2s; text-decoration: none;
}
.nav-link-index:hover { background: #e8f2fd; color: var(--c-brand); }
.nav-link-index.active { color: var(--c-brand); font-weight: 600; }

/* Hero */
.hero-index {
  padding: 160px 0 100px;
  background: linear-gradient(160deg, #0a1628 0%, #112240 30%, #1a365d 50%, #1e3a5f 70%, #0f1d35 100%);
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.hero-index::before {
  content: ''; position: absolute;
  top: -300px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(32,128,240,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-index::after {
  content: ''; position: absolute;
  bottom: -200px; left: -150px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-index .container { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 0 24px; }
.hero-badge-index {
  display: inline-block;
  background: rgba(32,128,240,.15);
  border: 1px solid rgba(32,128,240,.3);
  color: #60a5fa;
  font-size: 13px; font-weight: 600;
  padding: 6px 18px; border-radius: 20px;
  margin-bottom: 28px; letter-spacing: 1px;
}
.hero-index h1 {
  font-size: 52px; font-weight: 900; letter-spacing: -1px;
  margin-bottom: 20px; line-height: 1.2;
}
.hero-index h1 .hl {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-index .hero-sub {
  font-size: 18px; color: rgba(255,255,255,.65);
  max-width: 600px; margin: 0 auto 36px; line-height: 1.9;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  padding: 14px 36px; font-size: 15px; font-weight: 700;
  border-radius: 8px; cursor: pointer;
  text-decoration: none; transition: all .25s;
  border: none; display: inline-block;
}
.btn-hero-primary {
  background: linear-gradient(135deg, #2080f0, #6366f1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(32,128,240,.35);
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(32,128,240,.5);
  text-decoration: none;
}
.btn-hero-outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.4);
  text-decoration: none;
}

/* Section */
.section-dark { background: #f8fafc; }
.section-title {
  font-size: 34px; font-weight: 800;
  text-align: center; margin-bottom: 12px;
  color: var(--text);
}
.section-sub {
  font-size: 16px; text-align: center;
  color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 60px;
}

/* Features Grid */
.features-grid-client {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card-client {
  background: #fff; border-radius: 16px;
  padding: 36px 28px;
  border: 1px solid var(--border-light);
  text-align: center; transition: all .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.feature-card-client:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
  border-color: #cbd5e1;
}
.feature-card-client .fc-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 20px;
}
.fc-icon.blue   { background: #dbeafe; }
.fc-icon.teal   { background: #ccfbf1; }
.fc-icon.green  { background: #dcfce7; }
.fc-icon.amber  { background: #fef3c7; }
.fc-icon.indigo { background: #e0e7ff; }
.fc-icon.orange { background: #ffedd5; }
.fc-icon.purple { background: #ede9fe; }
.fc-icon.rose   { background: #ffe4e6; }
.fc-icon.cyan   { background: #cffafe; }
.feature-card-client h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.feature-card-client p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }

/* AI Grid */
.ai-grid-client {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ai-card-client {
  background: #fff; border-radius: 14px;
  padding: 32px 22px; text-align: center;
  border: 1px solid var(--border-light);
  transition: all .25s;
}
.ai-card-client:hover {
  border-color: var(--c-brand);
  box-shadow: 0 4px 16px rgba(32,128,240,.08);
}
.ai-card-client .ai-num {
  font-size: 40px; font-weight: 900;
  color: #e2e8f0; margin-bottom: 8px;
}
.ai-card-client h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.ai-card-client p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.ai-note {
  text-align: center; margin-top: 40px;
  padding: 20px 28px; background: #fff8e7;
  border: 1px solid #fde68a; border-radius: 12px;
  font-size: 14px; color: #92400e; line-height: 1.8;
}
.ai-note strong { color: #d97706; }

/* Flow */
.flow-client {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.flow-step {
  background: #fff; border-radius: 16px;
  padding: 32px 24px; text-align: center;
  width: 220px; border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  position: relative; z-index: 2;
}
.flow-step .step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-brand); color: #fff;
  font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.flow-step h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.flow-step p { font-size: 13px; color: var(--text-secondary); }
.flow-arrow {
  font-size: 28px; color: #94a3b8;
  margin: 0 12px; flex-shrink: 0;
  z-index: 1; font-weight: 300;
}

/* Highlights */
.highlights-client {
  max-width: 760px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.highlight-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px; background: #fff;
  border-radius: 12px; border: 1px solid var(--border-light);
}
.highlight-item .hl-icon { flex-shrink: 0; font-size: 22px; }
.highlight-item h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.highlight-item p { font-size: 13px; color: var(--text-secondary); }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, #1a365d, #1e3a5f);
  color: #fff; text-align: center; padding: 80px 0;
}
.cta-section h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 16px; color: rgba(255,255,255,.65); margin-bottom: 32px; }
.cta-section .btn-hero-primary { font-size: 16px; padding: 16px 44px; }

/* =================================================================
   首页 — 区域底色（去白化）+ 卡片色彩变化
   ================================================================= */

/* ---- Section Backgrounds — distinct tinted bands ---- */
.section-features {
  background: linear-gradient(175deg, #dce4f0 0%, #e8eef6 45%, #dce4f0 100%);
}
.section-ai-bg {
  background: linear-gradient(175deg, #d5dfed 0%, #e3eaf4 45%, #d5dfed 100%);
}
.section-flow {
  background: linear-gradient(175deg, #e8e2d4 0%, #f0ece3 45%, #e8e2d4 100%);
}
.section-highlights-bg {
  background: linear-gradient(175deg, #e0dcee 0%, #ebe8f5 45%, #e0dcee 100%);
}

/* ---- Feature Cards — each with unique colored gradient ---- */
.feature-card-client {
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.feature-card-client:nth-child(1) {
  background: linear-gradient(160deg, #f8fafe 0%, #eef3fd 100%);
  border-color: #d4e0f7;
}
.feature-card-client:nth-child(2) {
  background: linear-gradient(160deg, #f4fcfa 0%, #e6f7f1 100%);
  border-color: #b8f0d8;
}
.feature-card-client:nth-child(3) {
  background: linear-gradient(160deg, #f8fdf9 0%, #edf7f0 100%);
  border-color: #c8e6d0;
}
.feature-card-client:nth-child(4) {
  background: linear-gradient(160deg, #fefdf8 0%, #fdf7e8 100%);
  border-color: #f5e6c0;
}
.feature-card-client:nth-child(5) {
  background: linear-gradient(160deg, #f8f9ff 0%, #eef0fd 100%);
  border-color: #cfd4f7;
}
.feature-card-client:nth-child(6) {
  background: linear-gradient(160deg, #fefbf6 0%, #fdf3e2 100%);
  border-color: #f5dbb0;
}
.feature-card-client:nth-child(7) {
  background: linear-gradient(160deg, #f3effc 0%, #e6dcf7 100%);
  border-color: #cbbef0;
}
.feature-card-client:nth-child(8) {
  background: linear-gradient(160deg, #fdf0f3 0%, #f9dde3 100%);
  border-color: #f0c4ce;
}
.feature-card-client:nth-child(9) {
  background: linear-gradient(160deg, #f0f9fb 0%, #ddf0f5 100%);
  border-color: #b8dde8;
}
/* Feature card hover — lift without overriding border color */
.feature-card-client:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,.1);
}

/* ---- AI Cards — each with unique colored gradient ---- */
.ai-card-client:nth-child(1) {
  background: linear-gradient(160deg, #f8fafe 0%, #eef3fc 100%);
  border-color: #dbe6f8;
}
.ai-card-client:nth-child(2) {
  background: linear-gradient(160deg, #f8fdf9 0%, #eef7f1 100%);
  border-color: #cfe4d5;
}
.ai-card-client:nth-child(3) {
  background: linear-gradient(160deg, #faf8ff 0%, #f3eefc 100%);
  border-color: #e0d5f5;
}
.ai-card-client:nth-child(4) {
  background: linear-gradient(160deg, #fefdf8 0%, #fdf8ea 100%);
  border-color: #f5e8c5;
}
/* AI card hover */
.ai-card-client:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ---- Flow Steps — each with unique colored gradient ---- */
/* flow-arrow divs are siblings, so nth-of-type counts ALL divs: 1,3,5,7 */
.flow-step:nth-of-type(1) {
  background: linear-gradient(160deg, #f8fafe 0%, #edf3fd 100%);
  border-color: #d4e0f7;
}
.flow-step:nth-of-type(3) {
  background: linear-gradient(160deg, #f8fdf9 0%, #edf7f0 100%);
  border-color: #c8e6d0;
}
.flow-step:nth-of-type(5) {
  background: linear-gradient(160deg, #faf8ff 0%, #f2edfd 100%);
  border-color: #ddd0f7;
}
.flow-step:nth-of-type(7) {
  background: linear-gradient(160deg, #fefdf8 0%, #fdf7e8 100%);
  border-color: #f5e6c0;
}
.flow-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* ---- Highlight Items — each with unique colored gradient ---- */
.highlight-item:nth-child(1) {
  background: linear-gradient(160deg, #f8fafe 0%, #eef3fd 100%);
  border-color: #d4e0f7;
}
.highlight-item:nth-child(2) {
  background: linear-gradient(160deg, #f8fdf9 0%, #edf7f0 100%);
  border-color: #c8e6d0;
}
.highlight-item:nth-child(3) {
  background: linear-gradient(160deg, #faf8ff 0%, #f2edfd 100%);
  border-color: #ddd0f7;
}
.highlight-item:nth-child(4) {
  background: linear-gradient(160deg, #fefdf8 0%, #fdf7e8 100%);
  border-color: #f5e6c0;
}
.highlight-item:nth-child(5) {
  background: linear-gradient(160deg, #f8fafc 0%, #eaf0f6 100%);
  border-color: #c8d6e5;
}
.highlight-item:nth-child(6) {
  background: linear-gradient(160deg, #f0f9fb 0%, #ddf0f5 100%);
  border-color: #b8dde8;
}
.highlight-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

/* =================================================================
   客户端登录页 (client_login.html)
   ================================================================= */

.login-section {
  padding: 120px 0 80px;
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.login-wrap {
  max-width: 420px; width: 100%; margin: 0 auto;
  background: #fff; border-radius: 16px; padding: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}
.login-wrap h2 {
  font-size: 24px; font-weight: 800;
  text-align: center; margin-bottom: 4px;
  color: var(--text);
}
.login-wrap .subtitle {
  font-size: 14px; color: var(--text-secondary);
  text-align: center; margin-bottom: 32px;
}
.login-wrap .form-group { margin-bottom: 18px; }
.login-wrap .form-group label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.login-wrap .form-group input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.login-wrap .form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.login-wrap .btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; font-size: 16px; font-weight: 700;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; letter-spacing: .5px; transition: all .2s;
}
.login-wrap .btn-login:hover {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.login-wrap .btn-login:disabled { opacity: .6; cursor: not-allowed; }
.login-wrap .error-msg {
  background: #fef2f2; color: var(--danger);
  font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 16px; display: none; border: 1px solid #fecaca;
}
.login-wrap .links {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--text-secondary);
}
.login-wrap .links a { color: var(--primary); font-weight: 600; }

/* =================================================================
   客户端控制台 (client_dashboard.html)
   ================================================================= */

.dashboard-section {
  padding: 100px 0 60px;
  min-height: 80vh;
}
.dash-container {
  max-width: 800px; margin: 0 auto;
  padding: 0 24px;
}
.dash-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dash-header h1 {
  font-size: 28px; font-weight: 800;
  color: var(--text);
}
.dash-header .welcome { font-size: 14px; color: var(--text-secondary); }
.btn-logout {
  padding: 8px 18px; background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
}
.btn-logout:hover {
  border-color: #fecaca; color: var(--danger);
  background: #fef2f2;
}

/* Cards */
.dash-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
.dash-card {
  background: #fff; border-radius: 14px;
  padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}
.dash-card.full-width { grid-column: 1 / -1; }
.dash-card .card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}
.dash-card .card-icon.blue   { background: #dbeafe; }
.dash-card .card-icon.green  { background: #dcfce7; }
.dash-card .card-icon.purple { background: #ede9fe; }
.dash-card .card-icon.amber  { background: #fef3c7; }
.dash-card h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.dash-card .info-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.dash-card .info-row:last-child { border-bottom: none; }
.dash-card .info-label { color: var(--text-secondary); }
.dash-card .info-value { color: var(--text); font-weight: 600; text-align: right; }
.dash-card .info-value.key-masked {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: #6366f1;
  background: #f1f5f9; padding: 2px 8px; border-radius: 4px;
}
.dash-card .info-value.text-danger  { color: var(--danger); }
.dash-card .info-value.text-success { color: var(--success); }
.dash-card .info-value.text-warning { color: var(--warning); }

/* Status badge */
.status-badge {
  display: inline-block; padding: 3px 12px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
}
.status-badge.active   { background: #dcfce7; color: #166534; }
.status-badge.expired  { background: #fef2f2; color: #991b1b; }
.status-badge.inactive { background: #f1f5f9; color: var(--text-secondary); }

/* Plan badge */
.plan-badge {
  display: inline-block; padding: 3px 12px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
}
.plan-badge.quarterly    { background: #dbeafe; color: #1e40af; }
.plan-badge.semi_annual  { background: #ede9fe; color: #5b21b6; }
.plan-badge.annual       { background: #fef3c7; color: #92400e; }

/* Loading */
.loading-wrap {
  text-align: center; padding: 80px 0;
  color: #94a3b8; font-size: 16px;
}

/* Key copy */
.key-row { display: flex; align-items: center; gap: 8px; }
.btn-copy, .btn-eye {
  padding: 2px 4px; font-size: 16px;
  border: none; background: transparent;
  border-radius: 4px; cursor: pointer;
  transition: all .15s; line-height: 1; opacity: .45;
}
.btn-copy:hover, .btn-eye:hover { opacity: 1; background: #f1f5f9; }
.btn-eye:active { opacity: 1; background: #ede9fe; }
.key-masked.revealed { background: #fef3c7 !important; color: #92400e !important; }

/* =================================================================
   RESPONSIVE — Client pages
   ================================================================= */

@media (max-width: 768px) {
  .hero-index h1 { font-size: 32px; }
  .hero-index .hero-sub { font-size: 15px; }
  .features-grid-client { grid-template-columns: 1fr 1fr; }
  .ai-grid-client { grid-template-columns: 1fr 1fr; }
  .flow-client { flex-direction: column; gap: 0; }
  .flow-arrow { transform: rotate(90deg); margin: 8px 0; }
  .highlights-client { grid-template-columns: 1fr; }
  .section-title { font-size: 26px; }
}

@media (max-width: 640px) {
  .features-grid-client { grid-template-columns: 1fr; }
  .ai-grid-client { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
