/* Naicha Link —— 与 naicha.cloud 官网同一套视觉语言
   主色 #0078d4 → #0f9be0，浅灰蓝底 #f2f6fa，14px 圆角卡片 */

:root {
  --n1: #0078d4;
  --n2: #0f9be0;
  --ng: linear-gradient(135deg, #0078d4, #0f9be0);
  --ok: #22b07d;
  --warn: #f0a020;
  --danger: #d5483c;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e3ecf3;
  --bg: #f2f6fa;
  --card: #fff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 120, 212, .08);
  --shadow-sm: 0 2px 12px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", "幼圆", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
a { color: var(--n1); text-decoration: none; }
a:hover { color: #0a8fd0; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; color: var(--text); }
p { margin: 0 0 1em; }
code, pre { font-family: ui-monospace, Consolas, "Liberation Mono", monospace; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ═══ 顶部导航（与官网一致的蓝色渐变条）═══ */
.site-header {
  position: sticky; top: 0; z-index: 60; height: 56px;
  background: radial-gradient(1100px 480px at 50% -10%, #0f9be0 0%, #0078d4 55%, #0c4f7a 100%);
  box-shadow: 0 2px 12px rgba(0, 120, 212, .25);
  border-bottom: none;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ng); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 120, 212, .3);
}
.brand-name { font-size: 17px; letter-spacing: -.2px; color: var(--text); }
.site-header .brand, .site-header .brand-name { color: #fff; }
.site-header .brand-mark { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.site-nav { display: flex; gap: 2px; flex: 1; }
.site-nav a { color: rgba(255, 255, 255, .9); padding: 7px 15px; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.site-nav a.active { color: #fff; background: rgba(255, 255, 255, .2); font-weight: 600; }
.header-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.header-actions .btn-primary { background: #fff; color: var(--n1); box-shadow: none; }
.header-actions .btn-ghost { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; }
.header-actions .btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: #fff; }

/* ═══ 按钮 ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: 9px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--ng); color: #fff;
  box-shadow: 0 2px 8px rgba(0, 120, 212, .2);
  font-family: inherit; transition: .15s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }
.btn-primary { background: var(--ng); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--n1); color: var(--n1); }
.btn-danger { background: linear-gradient(135deg, #d5483c, #a32c22); color: #fff; }
.btn-sm { padding: 5px 14px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

/* ═══ 首页 Hero（官网同款全幅渐变）═══ */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1100px 480px at 50% -10%, #0f9be0 0%, #0078d4 55%, #0c4f7a 100%);
  color: #fff; padding: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(360px 260px at 82% 76%, rgba(255, 255, 255, .1), transparent 62%);
  pointer-events: none;
}
.hero .container {
  position: relative; z-index: 1; max-width: 1080px;
  padding: 76px 20px 62px; background: none; border-radius: 0; box-shadow: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  padding: 6px 16px; border-radius: 100px; font-size: 12px; font-weight: 600; margin-bottom: 22px;
}
.hero-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .28);
}
.hero h1 {
  font-size: 52px; font-weight: 900; line-height: 1.12; letter-spacing: -1.5px;
  color: #fff; margin-bottom: 14px; text-shadow: 0 2px 14px rgba(0, 40, 80, .3);
}
.hero p.lead {
  font-size: 17px; color: rgba(255, 255, 255, .92); max-width: 620px;
  line-height: 1.85; margin-bottom: 30px; text-shadow: 0 1px 6px rgba(0, 40, 80, .2);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-actions .btn { padding: 12px 28px; font-size: 15px; border-radius: 10px; }
.hero-actions .btn-primary { background: #fff; color: var(--n1); box-shadow: 0 10px 26px -8px rgba(0, 40, 80, .5); }
.hero-actions .btn-primary:hover { background: #f0f9ff; color: var(--n1); }
.hero-actions .btn-ghost { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.hero-stats { display: flex; gap: 46px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
.hero-stat b em { font-style: normal; color: #8fd0ff; }
.hero-stat span { color: rgba(255, 255, 255, .78); font-size: 12.5px; }

/* ═══ 区块 ═══ */
.section { padding: 52px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 30px; text-align: center; }
.section-head h1, .section-head h2 { font-size: 28px; letter-spacing: -.4px; font-weight: 800; }
.section-head h2 em, .section-head h1 em { font-style: normal; color: var(--n1); }
.section-head p { color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ═══ 卡片 ═══ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--ng); color: #fff; font-size: 19px; margin-bottom: 12px;
}
.feature-card { background: #fafcfe; transition: .18s; }
.feature-card:hover { transform: translateY(-3px); border-color: #cfe3f3; box-shadow: 0 8px 24px rgba(0, 120, 212, .1); }
.feature-card h3 { font-size: 14px; margin-bottom: 6px; }
.feature-card p { font-size: 12.5px; line-height: 1.75; margin: 0; }

/* ═══ 价格 ═══ */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 24px 20px; }
.price-card.featured { border: 2px solid var(--n1); box-shadow: 0 14px 36px rgba(0, 120, 212, .16); }
.price-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--ng); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.price-name { font-size: 16px; font-weight: 800; }
.price-sub { color: var(--muted); font-size: 12.5px; min-height: 22px; }
.price-amount { margin: 14px 0 2px; }
.price-amount b { font-size: 34px; letter-spacing: -1px; }
.price-amount span { color: var(--muted); font-size: 13px; }
.price-features { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.price-features li { padding: 6px 0 6px 22px; position: relative; font-size: 13px; color: #334155; }
.price-features li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.period-switch { display: inline-flex; background: #e9f0f6; border-radius: 10px; padding: 4px; gap: 2px; }
.period-switch button {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: #4b5563; font-family: inherit;
}
.period-switch button.active { background: #fff; color: var(--n1); box-shadow: var(--shadow-sm); }

/* ═══ 表单 ═══ */
.form-card { max-width: 440px; margin: 48px auto; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
.input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #dde7ef; border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--text); font-family: inherit; outline: none;
  transition: .15s;
}
.input:focus, select:focus, textarea:focus { border-color: var(--n1); box-shadow: 0 0 0 3px rgba(0, 120, 212, .12); }
textarea { min-height: 120px; resize: vertical; }
.form-help { font-size: 11px; color: #94a3b8; margin-top: 5px; }
.form-actions { margin-top: 20px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .input { flex: 1; }

/* ═══ 提示 ═══ */
.flash { margin: 14px auto 0; padding: 10px 16px; border-radius: 10px; font-size: 13px; border: 1px solid; }
.flash-success { background: rgba(34, 176, 125, .08); border-color: rgba(34, 176, 125, .25); color: #15996b; }
.flash-error { background: rgba(213, 72, 60, .08); border-color: rgba(213, 72, 60, .25); color: var(--danger); }
.flash-info { background: rgba(0, 120, 212, .07); border-color: rgba(0, 120, 212, .2); color: var(--n1); }

/* ═══ 徽标 ═══ */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green { background: rgba(34, 176, 125, .1); color: #15996b; }
.badge-red { background: rgba(213, 72, 60, .1); color: var(--danger); }
.badge-yellow { background: rgba(240, 160, 32, .12); color: #c77d0e; }
.badge-gray { background: #eef1f4; color: var(--muted); }
.badge-blue { background: rgba(0, 120, 212, .1); color: var(--n1); }

/* ═══ 表格 ═══ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
th { background: #f7fafc; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7fbfe; }

/* ═══ 用户中心 ═══ */
.dash-grid { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.side-nav {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 10px; position: sticky; top: 80px;
  box-shadow: 0 6px 24px rgba(0, 120, 212, .08);
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 13.5px; margin-bottom: 2px; }
.side-nav a:hover { background: #eaf4fa; color: var(--n1); }
.side-nav a.active { background: var(--ng); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 120, 212, .25); }
.side-nav .side-title { font-size: 11px; color: #94a3b8; padding: 10px 12px 6px; font-weight: 700; letter-spacing: .04em; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--ng); color: #fff; border: none;
  border-radius: var(--radius); padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 120, 212, .18);
}
.stat-card .label { font-size: 12px; opacity: .85; }
.stat-card .value { font-size: 23px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; color: #fff; }
.stat-card .badge { background: rgba(255, 255, 255, .92); color: #0b4f7a; }

.progress { height: 8px; background: #eef2f6; border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ng); border-radius: 4px; }

.copy-box { display: flex; gap: 8px; align-items: center; background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; padding: 7px 7px 7px 13px; }
.copy-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.copy-box button { flex-shrink: 0; }

/* ═══ 工单 ═══ */
.ticket-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-meta { font-size: 11.5px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.chat-item { max-width: 78%; padding: 11px 14px; border-radius: 12px; background: #f1f5f9; font-size: 13px; white-space: pre-wrap; line-height: 1.7; }
.chat-item.admin { align-self: flex-end; background: var(--ng); color: #fff; border-bottom-right-radius: 4px; }
.chat-item.admin .who { color: rgba(255, 255, 255, .75); }
.chat-item .who { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* ═══ 空状态 ═══ */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .icon { font-size: 36px; margin-bottom: 10px; }

/* ═══ 页脚 ═══ */
.site-footer { margin-top: 40px; background: #fff; border-top: 1px solid var(--line); padding: 34px 0 20px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: var(--text); font-size: 13px; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--muted); font-size: 12.5px; padding: 3px 0; }
.footer-grid a:hover { color: var(--n1); }
.brand-footer { color: var(--text); margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 16px; border-top: 1px solid #f1f5f9; font-size: 12px; color: #94a3b8; flex-wrap: wrap; }

/* ═══ 分页 ═══ */
.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--text); }
.pager a.active { background: var(--ng); border-color: transparent; color: #fff; }

/* ═══ 管理后台 ═══ */
.admin-body { background: #f2f6fa; }
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.admin-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 12px; }
.admin-side .brand { margin-bottom: 22px; padding: 0 6px; }
.admin-side a { display: block; color: var(--text); padding: 9px 12px; border-radius: 9px; font-size: 13.5px; margin-bottom: 2px; }
.admin-side a:hover { background: #eaf4fa; color: var(--n1); }
.admin-side a.active { background: var(--ng); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 120, 212, .25); }
.admin-side .side-title { font-size: 11px; letter-spacing: .04em; color: #94a3b8; padding: 14px 12px 6px; font-weight: 700; }
.admin-main { padding: 24px 28px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }

/* ═══ 一键连接弹窗 ═══ */
.connect-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; }
.connect-modal.show { display: flex; }
.connect-box { background: #fff; border-radius: 16px; width: 540px; max-width: 100%; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); max-height: 90vh; overflow-y: auto; }
.connect-box h3 { font-size: 17px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.connect-box .steps { margin: 14px 0; padding: 14px 16px; background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: #334155; line-height: 1.9; }
.connect-box .steps b { color: var(--n1); }
.connect-box .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ═══ 响应式 ═══ */
@media (max-width: 960px) {
  .grid-4, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid, .grid-3 { grid-template-columns: 1fr; }
  .dash-grid, .admin-shell { grid-template-columns: 1fr; }
  .side-nav { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .site-nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px;
    flex-direction: column; box-shadow: 0 10px 30px rgba(15, 23, 42, .1);
  }
  .site-nav a { color: var(--text); }
  .site-nav a:hover, .site-nav a.active { color: var(--n1); background: #eaf4fa; }
  body.nav-open .site-nav { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-actions .btn-ghost:first-child { display: none; }
  .hero .container { padding: 34px 22px; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 24px; margin-top: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 18px 14px; }
}
