/* ============================================================================
   DooGrid 官网 / 账号 / 管理后台 共用样式
   单一 CSS，营销页与应用页共用一套 token，避免多份主题漂移
   ============================================================================ */

:root {
    --ink: #0d1526;
    --ink-2: #253247;
    --muted: #61708a;
    --line: #e4e9f2;
    --line-strong: #cfd8e6;
    --bg: #ffffff;
    --soft: #f5f8fc;
    --soft-2: #eef3fa;
    --brand: #2563eb;
    --brand-dark: #1c4ed8;
    --brand-soft: #eaf1ff;
    --accent: #7c3aed;
    --ok: #14804a;
    --ok-soft: #e6f6ec;
    --warn: #a16207;
    --warn-soft: #fdf6e3;
    --danger: #c1323b;
    --danger-soft: #fdecee;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(13, 21, 38, .06), 0 1px 3px rgba(13, 21, 38, .04);
    --shadow-md: 0 8px 24px rgba(13, 21, 38, .08);
    --shadow-lg: 0 24px 60px rgba(13, 21, 38, .14);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; font-size: 16.5px; }
.brand-mark {
    width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 5px;
}
.brand-mark i { background: rgba(255, 255, 255, .92); border-radius: 1.5px; display: block; }
.brand-mark i:nth-child(3) { background: rgba(255, 255, 255, .55); }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
    font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--soft); border-color: #b9c5d6; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--soft-2); border-color: transparent; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------- 首页 hero ---------------- */
.hero { padding: 76px 0 8px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -160px 0 auto 0; height: 460px; z-index: -1;
    background:
        radial-gradient(680px 300px at 50% 0%, rgba(37, 99, 235, .13), transparent 70%),
        radial-gradient(520px 240px at 82% 10%, rgba(124, 58, 237, .10), transparent 70%);
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--brand);
    background: var(--brand-soft); border: 1px solid #d6e3ff;
    padding: 4px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
    margin: 0 auto 18px; max-width: 820px;
    font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--brand), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin: 0 auto 30px; max-width: 660px; font-size: 17px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-size: 12.5px; color: #8694a8; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------- iframe 演示 ---------------- */
.demo-shell { padding: 44px 0 20px; }
.browser {
    border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden;
    box-shadow: var(--shadow-lg); background: #fff;
}
.browser-bar {
    display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
    background: #f7f9fc; border-bottom: 1px solid var(--line);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: #dfe4ec; display: block; }
.browser-dots i:nth-child(1) { background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; }
.browser-dots i:nth-child(3) { background: #28c840; }
.browser-url {
    flex: 1; height: 24px; margin-left: 8px; display: flex; align-items: center;
    padding: 0 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line);
    font-family: var(--mono); font-size: 11.5px; color: #8492a6;
}
.browser iframe { display: block; width: 100%; height: 520px; border: 0; background: #fff; }
.demo-caption { margin: 14px 2px 0; font-size: 12.5px; color: #8694a8; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.demo-caption a { color: var(--brand); font-weight: 600; }

/* ---------------- 特性 ---------------- */
.section { padding: 76px 0; }
.section.soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 46px; text-align: center; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; }
.section-head p { margin: 0; color: var(--muted); font-size: 15.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
    padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-sm);
}
.feature .ico {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-size: 16px; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 6px; font-size: 15px; letter-spacing: -.01em; }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------------- 定价 ---------------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan {
    position: relative; padding: 26px 24px 24px; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; min-height: 100%;
}
.plan.popular { border-color: var(--brand); box-shadow: 0 12px 40px rgba(37, 99, 235, .16); }
.plan-badge {
    position: absolute; top: -11px; left: 24px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: #fff; background: var(--brand);
    padding: 3px 10px; border-radius: 999px;
}
.plan h3 { margin: 0 0 6px; font-size: 17px; }
.plan .tagline { margin: 0 0 18px; font-size: 13px; color: var(--muted); min-height: 38px; }
.plan .amount { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 4px; }
.plan .amount b { font-size: 38px; line-height: 1; letter-spacing: -.03em; }
.plan .amount span { font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.plan .period { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); padding: 5px 0; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 700; font-size: 12px; line-height: 1.7; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0 46px; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer p { margin: 0; font-size: 12.5px; color: #8694a8; }
.footer nav { display: flex; gap: 20px; font-size: 12.5px; }
.footer nav a { color: var(--muted); }
.footer nav a:hover { color: var(--ink); }

/* ---------------- 通用卡片 / 表单 ---------------- */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 22px;
}
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select {
    width: 100%; height: 40px; padding: 0 12px; font-size: 14px; font-family: inherit;
    color: var(--ink); background: #fff;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
    outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.field .hint { margin-top: 6px; font-size: 12px; color: #8694a8; }

.alert {
    display: none; padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 12.5px; margin-bottom: 14px; line-height: 1.5;
}
.alert.err { display: block; background: var(--danger-soft); color: var(--danger); border: 1px solid #f5c2c6; }
.alert.ok { display: block; background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe7cd; }
.alert.info { display: block; background: var(--warn-soft); color: var(--warn); border: 1px solid #f2e0b0; }

/* ---------------- 认证页 ---------------- */
.auth-page { min-height: 100%; display: flex; flex-direction: column; background: var(--soft); }
.auth-main { flex: 1; display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 30px 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.auth-card .sub { margin: 0 0 22px; font-size: 13.5px; color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft-2); border-radius: 10px; margin-bottom: 22px; }
.tabs button {
    flex: 1; height: 34px; border: 0; border-radius: 7px; background: transparent;
    font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.social { display: grid; gap: 10px; margin-bottom: 18px; }
.social .btn { justify-content: flex-start; gap: 10px; position: relative; }
.social .btn .soon {
    margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #8694a8; background: var(--soft-2);
    padding: 2px 7px; border-radius: 999px;
}
.divider { display: flex; align-items: center; gap: 12px; color: #9aa7b8; font-size: 11.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--brand); font-weight: 600; }

/* ---------------- 应用页（客户后台 / 管理后台） ---------------- */
.app-page { background: var(--soft); min-height: 100%; }
.app-main { padding: 30px 0 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.025em; }
.page-head p { margin: 0; font-size: 13.5px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }

.license {
    display: flex; align-items: center; gap: 10px; margin-top: 6px;
    padding: 10px 12px; background: var(--soft); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
    font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--ink);
}
.license span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.license .btn { flex-shrink: 0; }

.badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
    border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
    background: var(--soft-2); color: var(--muted);
}
.badge.free { background: var(--soft-2); color: var(--muted); }
.badge.pro { background: var(--brand-soft); color: var(--brand); }
.badge.team { background: #f1eaff; color: var(--accent); }
.badge.paid { background: var(--ok-soft); color: var(--ok); }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.canceled, .badge.refunded { background: var(--danger-soft); color: var(--danger); }
.badge.admin { background: #e8f0fe; color: #1a56db; }

.download {
    display: flex; align-items: center; gap: 14px; padding: 14px;
    border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--soft);
}
.download .file-ico {
    width: 38px; height: 38px; border-radius: 9px; background: #fff; border: 1px solid var(--line);
    display: grid; place-items: center; font-size: 16px; color: var(--muted); flex-shrink: 0;
}
.download .meta { flex: 1; min-width: 0; }
.download .meta b { display: block; font-size: 13.5px; }
.download .meta small { color: var(--muted); font-size: 12px; }

/* 数据表 */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th {
    position: sticky; top: 0; background: #f8fafc; z-index: 1;
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7b8aa0;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafcff; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .email { font-weight: 600; color: var(--ink); }
table.data .muted { color: var(--muted); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search {
    height: 34px; padding: 0 12px; width: 240px; font-size: 13px; font-family: inherit;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
}
.search:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.segmented { display: inline-flex; padding: 3px; background: var(--soft-2); border-radius: var(--radius-sm); }
.segmented button {
    height: 28px; padding: 0 12px; border: 0; background: transparent; border-radius: 6px;
    font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat .label { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7b8aa0; }
.stat .value { margin-top: 6px; font-size: 25px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .foot { margin-top: 3px; font-size: 12px; color: var(--muted); }

.note {
    display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin-bottom: 18px;
    background: var(--warn-soft); border: 1px solid #f2e0b0; border-radius: var(--radius-sm);
    font-size: 12.5px; color: var(--warn); line-height: 1.55;
}

/* ---------------- 收银台 ---------------- */
.checkout-page { background: #0f1624; min-height: 100%; display: grid; place-items: center; padding: 40px 20px; }
.checkout-card {
    width: 100%; max-width: 460px; background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.checkout-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.checkout-head .merchant { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.checkout-head .provider { font-family: var(--mono); font-size: 12px; color: #6b7785; letter-spacing: .04em; }
.checkout-body { padding: 22px; }
.checkout-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.checkout-total b { font-size: 30px; letter-spacing: -.03em; }
.checkout-total small { color: var(--muted); font-size: 12.5px; }
.card-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.checkout-actions { display: grid; gap: 10px; margin-top: 18px; }
.secure-note { margin-top: 14px; font-size: 11.5px; color: #8694a8; text-align: center; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .pricing { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .browser iframe { height: 420px; }
    .nav-links { display: none; }
}
@media (max-width: 620px) {
    .features { grid-template-columns: 1fr; }
    .hero { padding-top: 48px; }
    .section { padding: 54px 0; }
    .browser iframe { height: 360px; }
    .stats { grid-template-columns: 1fr; }
}
