/* ==========================================================================
   NC-CAM 全局样式（v1.0.3）
   全宽响应式 · 浅色主题 · 中英双语
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --ink: #0f172a;
    --text: #1f2937;
    --muted: #64748b;
    --bg: #f6f8fc;
    --card: #ffffff;
    --border: #e5e7eb;
    --border-strong: #d7dce5;
    --danger: #dc2626;
    --success: #16a34a;
    --gold: #f59e0b;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 4px 16px rgba(15, 23, 42, .07);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
    --max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; }

/* ============================ 顶部导航 ============================ */
.navbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 22px;
    min-height: 62px;
}
.navbar .brand {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    letter-spacing: -.2px;
}
.navbar .brand:hover { text-decoration: none; }
.navbar .brand .logo,
.footer-brand .logo {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 14px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .28);
}
.brand-text { white-space: nowrap; }

.nav-toggle {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 18px;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links > a {
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--text);
    font-weight: 500;
    font-size: 14.5px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.nav-links > a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.nav-links > a.active { background: var(--primary); color: #fff; }
.nav-links > a.nav-user { font-weight: 700; color: var(--ink); }
.nav-links > a.btn-nav-ghost { border-color: var(--border); }
.nav-links > a.btn-nav-solid { background: var(--primary); color: #fff; }
.nav-links > a.btn-nav-solid:hover { background: var(--primary-dark); color: #fff; }

/* 语言切换 */
.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    margin: 0 4px;
}
.lang-switch a {
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.5;
}
.lang-switch a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: #fff; }

/* ============================ 徽章（含导航内徽章，必须覆盖 .nav-links > a 的颜色） ============================ */
.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge.badge-primary { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge.badge-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge.badge-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge.badge-muted   { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.badge.badge-gold    { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.badge.badge-dark    { background: #1e293b; color: #ffffff; border-color: #1e293b; }
.badge.badge-danger  { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.member-chip { display: inline-flex; align-items: center; margin: 0 2px; }
.member-chip a.badge { text-decoration: none; }
.member-chip a.badge:hover { filter: brightness(.95); text-decoration: none; }

/* ============================ 布局 ============================ */
.container { max-width: var(--max); margin: 0 auto; padding: 26px 22px 40px; }
.container-narrow { max-width: 980px; margin: 0 auto; padding: 26px 22px; }

/* ============================ 卡片 ============================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 18px;
}
.card h2 { margin-bottom: 14px; font-size: 20px; }
.card h3 { font-size: 16px; }
.hint { font-size: 13px; color: var(--muted); }

/* ============================ 表单 ============================ */
.form-group { margin-bottom: 16px; }
.form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13.5px;
    color: var(--ink);
}
.form-group .hint { margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="search"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
input[disabled], select[disabled] { background: #f3f4f6; color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: auto; }

/* ============================ 按钮 ============================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .1s;
    background: var(--primary);
    color: #fff;
    text-align: center;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 30px; font-size: 16.5px; border-radius: 11px; }

/* ============================ 网格 ============================ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================ 表格 ============================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 700; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
tr:hover td { background: #fafbfc; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-family: "Consolas", "Monaco", monospace; font-size: 12.5px; }

/* ============================ 提示 ============================ */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ============================ 首页 ============================ */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 500px at 12% -10%, rgba(96, 165, 250, .35), transparent 60%),
        radial-gradient(900px 400px at 88% 0%, rgba(129, 140, 248, .30), transparent 60%),
        linear-gradient(140deg, #0b1f4b 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
    padding: 92px 22px 96px;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 78%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 78%);
    pointer-events: none;
}
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; text-align: center; z-index: 1; }
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: 46px; font-weight: 800; letter-spacing: -1px; margin-bottom: 18px; }
.hero h1 .accent { background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 18px; line-height: 1.75; color: rgba(255, 255, 255, .88); max-width: 780px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-hero {
    background: #fff; color: var(--primary-dark);
    box-shadow: 0 12px 28px rgba(2, 6, 23, .28);
}
.hero .btn-hero:hover { background: #f0f4ff; text-decoration: none; transform: translateY(-1px); }
.hero .btn-hero-ghost {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .42);
    color: #fff;
}
.hero .btn-hero-ghost:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }

/* 数据条 */
.stat-strip {
    position: relative;
    z-index: 2;
    max-width: 1040px;
    margin: -58px auto 0;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
}
.stat-strip > div { padding: 22px 18px; text-align: center; border-right: 1px solid var(--border); }
.stat-strip > div:last-child { border-right: none; }
.stat-strip .v { font-size: 27px; font-weight: 800; color: var(--primary); line-height: 1.25; }
.stat-strip .k { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }

/* 通用区块 */
.section { max-width: var(--max); margin: 0 auto; padding: 76px 22px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 42px; }
.section-eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 14px;
}
.section-head h2 { font-size: 34px; letter-spacing: -.6px; margin-bottom: 12px; }
.section-head p { font-size: 16.5px; color: var(--muted); }

/* 能力卡片 */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }
.cap-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.cap-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d7f7; }
.cap-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: var(--primary-light);
    border: 1px solid #dbeafe;
    margin-bottom: 16px;
}
.cap-card h3 { font-size: 17px; margin-bottom: 8px; }
.cap-card p { font-size: 14.5px; color: var(--muted); }

/* 三步流程 */
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.flow-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    box-shadow: var(--shadow-sm);
}
.flow-num {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    margin-bottom: 16px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .3);
}
.flow-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.flow-card p { font-size: 14.5px; color: var(--muted); }

/* 兼容清单 */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.chip b { color: var(--primary); font-weight: 700; }
.machine-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.machine-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.machine-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 16px; }

/* 安全区 */
.safety-band { background: #0f172a; color: #e2e8f0; border-radius: var(--radius-lg); padding: 46px 42px; }
.safety-band h2 { color: #fff; font-size: 28px; margin-bottom: 10px; }
.safety-band .lead { color: #94a3b8; margin-bottom: 26px; max-width: 760px; }
.safety-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.safety-item { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.7; color: #cbd5e1; }
.safety-item .mark { color: #fbbf24; font-weight: 800; }

/* 套餐预览 */
.home-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

/* CTA 区 */
.cta-band {
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    border-radius: var(--radius-lg);
    padding: 52px 40px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: 30px; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, .88); margin-bottom: 26px; font-size: 16.5px; }
.cta-band .btn-hero { background: #fff; color: var(--primary-dark); }
.cta-band .btn-hero:hover { background: #f0f4ff; text-decoration: none; }

/* ============================ 页脚 ============================ */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: 76px; }
.site-footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 52px 22px 30px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.footer-title { color: #e2e8f0; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.footer-col a { display: block; color: #94a3b8; padding: 4px 0; font-size: 14px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-note { font-size: 13.5px; line-height: 1.75; color: #94a3b8; }
.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, .18);
    padding: 18px 22px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* ============================ 会员状态条 ============================ */
.member-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    align-items: end;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 14px;
}
.member-status .hint { font-size: 12.5px; }

/* 用量进度条 */
.usage-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.usage-bars .bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.usage-bars .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #6366f1); border-radius: 999px; }

/* ============================ 套餐卡片 ============================ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 20px; margin-top: 18px; }
.plan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
}
.plan-card.current { border-color: var(--success); box-shadow: 0 0 0 2px rgba(22, 163, 74, .16); }
.plan-card.recommend { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245, 158, 11, .18); }
.plan-tag {
    position: absolute;
    top: -12px; right: 18px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 700;
    box-shadow: 0 6px 14px rgba(245, 158, 11, .35);
}
.plan-card h3 { font-size: 18px; }
.plan-price { margin: 10px 0 14px; }
.plan-price .cur { font-size: 15px; color: var(--danger); font-weight: 700; }
.plan-price .num { font-size: 32px; font-weight: 800; color: var(--danger); letter-spacing: -.5px; }
.plan-price .per { font-size: 13px; color: var(--muted); }
.plan-features { list-style: none; margin: 0 0 14px; padding: 0; }
.plan-features li { position: relative; padding-left: 20px; font-size: 14px; color: #374151; margin-bottom: 6px; }
.plan-features li:before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plan-limits { width: 100%; font-size: 13px; border-collapse: collapse; margin-bottom: 16px; }
.plan-limits td { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.plan-limits td:last-child { text-align: right; font-weight: 700; color: #374151; }

/* ============================ 刀尖形状 ============================ */
.tool-shape-box {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 12px;
    background: #fafbfc;
    min-height: 64px;
    margin-bottom: 12px;
}
.tool-shape svg { background: #fff; border-radius: 10px; }
.shape-params { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.shape-params td { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.shape-params td:first-child { color: var(--muted); width: 45%; }
.shape-params td:last-child { text-align: right; font-weight: 600; }

/* ============================ AI 面板 ============================ */
.ai-panel { background: #f8fafc; border: 1px solid #dbeafe; }
.ai-panel h3 { color: #1e3a8a; }
.warn-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.75;
}

/* 图纸预览与识别结果 */
.preview-box {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    min-height: 150px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; padding: 8px; overflow: hidden;
}
.preview-box img { max-width: 100%; max-height: 240px; border-radius: 8px; }
.recog-result {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-size: 13.5px;
    max-height: 420px;
    overflow: auto;
}
.recog-result h4 { margin-bottom: 8px; font-size: 15px; }
.recog-result ul { margin: 4px 0 10px 18px; }
.recog-result li { margin-bottom: 3px; }

/* NC 代码预览 */
.nc-code {
    background: #0f172a;
    color: #cbd5e1;
    font-family: "Consolas", "Monaco", monospace;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    white-space: pre;
    font-size: 13px;
    line-height: 1.55;
    max-height: 620px;
    overflow-y: auto;
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.25; }
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ============================ 后台布局 ============================ */
.admin-layout { display: flex; min-height: calc(100vh - 62px); }
.admin-sidebar {
    width: 232px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 14px 0;
    flex-shrink: 0;
}
.admin-sidebar a {
    display: block;
    padding: 11px 20px;
    color: var(--text);
    font-weight: 500;
    font-size: 14.5px;
    border-left: 3px solid transparent;
}
.admin-sidebar a:hover { background: #f8fafc; text-decoration: none; }
.admin-sidebar a.active { background: var(--primary-light); border-left-color: var(--primary); color: var(--primary-dark); font-weight: 700; }
.admin-content { flex: 1; padding: 24px 26px 40px; min-width: 0; }
.side-title {
    margin: 14px 14px 6px;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .8px;
    text-transform: uppercase;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
    font-weight: 700;
}

/* ============================ 响应式 ============================ */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .flow-grid { grid-template-columns: 1fr; }
    .site-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .navbar-inner { flex-wrap: wrap; padding: 10px 16px; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 0 12px;
    }
    .nav-links.open { display: flex; }
    .nav-links > a { padding: 11px 12px; }
    .lang-switch { align-self: flex-start; margin: 6px 0; }
    .member-chip { align-self: flex-start; margin: 4px 0; }
    .hero { padding: 60px 18px 74px; }
    .hero h1 { font-size: 31px; }
    .hero-sub { font-size: 16px; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .stat-strip > div:nth-child(2) { border-right: none; }
    .machine-cols { grid-template-columns: 1fr; }
    .section { padding: 52px 18px 0; }
    .section-head h2 { font-size: 26px; }
    .safety-band { padding: 34px 24px; }
    .cta-band { padding: 38px 22px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; padding: 8px; }
    .admin-sidebar a { display: inline-block; border-left: none; border-bottom: 2px solid transparent; border-radius: 8px; }
    .admin-sidebar a.active { border-bottom-color: transparent; }
    .side-title { width: 100%; margin: 8px 10px 4px; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container, .container-narrow { padding: 16px; }
    .member-status { grid-template-columns: repeat(2, 1fr); }
    .plan-grid { grid-template-columns: 1fr; }
    .site-footer-inner { grid-template-columns: 1fr; padding: 38px 18px 22px; }
    .card { padding: 18px; }
    .stat-strip { margin-top: -46px; }
}

/* ============================================================
   v1.2.0 刀具序列编辑器
   ============================================================ */
.tool-seq-card { border: 1px solid var(--border-strong); background: linear-gradient(180deg, #fbfdff 0%, #ffffff 60%); }
.seq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.seq-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seq-count { font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-light); border-radius: 999px; padding: 4px 12px; }
.btn-soft { background: #fff; color: var(--primary); border: 1px solid var(--border-strong); }
.btn-soft:hover { background: var(--primary-light); }

.tool-seq { display: flex; flex-direction: column; gap: 12px; }
.tool-row { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.tool-row-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tool-row-head .form-group { margin-bottom: 0; flex: 1 1 150px; min-width: 130px; }
.tool-row-head .form-group:first-of-type { flex: 0 0 110px; }
.seq-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.btn-del { border: 1px solid var(--border-strong); background: #fff; color: var(--danger); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1; flex: 0 0 auto; }
.btn-del:hover { background: #fef2f2; }

.tool-row-body { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.tool-row-main { flex: 1 1 420px; min-width: 280px; }
.tool-row-side { flex: 0 0 190px; min-width: 160px; border-left: 1px dashed var(--border); padding-left: 12px; }
.sub-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.sub-block .hint { margin-bottom: 6px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.shape-mini { min-height: 96px; display: flex; align-items: center; justify-content: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.shape-mini .tool-shape svg { max-height: 120px; }

@media (max-width: 1100px) {
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-row-side { border-left: none; padding-left: 0; flex: 1 1 100%; }
    .tool-row-head .form-group:first-of-type { flex: 1 1 100px; }
}

@media (max-width: 480px) {
    .stat-strip { grid-template-columns: 1fr; }
    .stat-strip > div { border-right: none; border-bottom: 1px solid var(--border); }
    .hero h1 { font-size: 26px; }
    .member-status { grid-template-columns: 1fr; }
}

/* ============================ v1.3.0 三步向导 ============================ */
.data-table { font-size: 13.5px; }
.data-table th { white-space: nowrap; }
.wiz {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    flex-wrap: wrap;
}
.wiz-step {
    flex: 1 1 160px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.wiz-num {
    width: 28px; height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
}
.wiz-txt { font-weight: 600; font-size: 13.5px; color: var(--muted); }
.wiz-step.active { border-color: var(--primary); background: #eff6ff; box-shadow: var(--shadow-sm); }
.wiz-step.active .wiz-num { background: var(--primary); color: #fff; }
.wiz-step.active .wiz-txt { color: var(--primary); font-weight: 700; }
.wiz-step.done .wiz-num { background: #16a34a; color: #fff; }
.wiz-step.done .wiz-txt { color: #15803d; }

/* ============================ 两条生成路线 ============================ */
.route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.route-card {
    position: relative;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
}
.route-card h3 { margin: 0 0 8px; font-size: 18px; }
.route-card > p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.route-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--primary);
    background: #dbeafe;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
}
.route-ai .route-tag { color: #7c3aed; background: #ede9fe; }
.route-list { margin: 0 0 16px 18px; font-size: 13px; color: var(--muted); flex: 1 1 auto; }
.route-list li { margin-bottom: 5px; }
.route-card .btn { margin-top: auto; }

@media (max-width: 820px) {
    .route-grid { grid-template-columns: 1fr; }
    .wiz-step { flex: 1 1 100%; }
}
