/* ==========================================================================
   TecoAdmin 前台首页
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf1ff;
    --teal: #0f766e;
    --teal-soft: #e6fffb;
    --amber: #c87917;
    --amber-soft: #fff4e5;
    --ink: #122033;
    --text: #31415a;
    --muted: #6b7c93;
    --border: #e5eaf2;
    --bg: #f6f9fd;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(18, 32, 51, .10);
    --shadow-sm: 0 4px 16px rgba(18, 32, 51, .06);
    --radius: 16px;
    --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
body.front {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body.front > main { flex: 1 0 auto; }
body.front > footer { margin-top: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 26px;
}

/* ---------- 顶栏 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(229, 234, 242, .9);
    backdrop-filter: blur(12px);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.brand-logo img {
    max-width: 29px;
    max-height: 29px;
    object-fit: contain;
}
.brand-text b {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: .01em;
}
.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .08em;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 8px;
}
.site-nav a {
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.site-nav a.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--white);
}
.lang-switch a {
    padding: 4px 9px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}
.lang-switch a.is-active { color: var(--white); background: var(--primary); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 70px;
    background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 72%);
}
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}
.hero-glow-a {
    width: 380px;
    height: 380px;
    inset-inline-end: -120px;
    top: -190px;
    background: rgba(37, 99, 235, .10);
}
.hero-glow-b {
    width: 260px;
    height: 260px;
    inset-inline-start: -120px;
    bottom: -150px;
    background: rgba(15, 118, 110, .08);
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 54px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid #cfe0ff;
    border-radius: 20px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
}
.hero-copy h1 {
    margin: 16px 0 12px;
    color: var(--ink);
    font-size: 46px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
}
.hero-copy > p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 26px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 12px 28px rgba(37, 99, 235, .28); }
.btn-ghost {
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #cfe0ff; color: var(--primary); }
.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 12px;
}
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-points i { color: #12a37a; font-size: 11px; }

/* 预览骨架 */
.hero-visual { min-width: 0; }
.hero-image-wrap { display: flex; align-items: center; justify-content: center; }
.hero-image { display: block; width: 100%; height: auto; border-radius: 16px; object-fit: cover; }
.preview {
    width: 100%;
    max-width: 470px;
    margin-inline-start: auto;
    overflow: hidden;
    border: 1px solid #dce6f2;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}
.preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    background: #fbfdff;
}
.preview-bar b {
    margin-inline-start: 8px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
}
.preview-bar small {
    margin-inline-start: auto;
    color: var(--muted);
    font-size: 10px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-red { background: #ef8b8b; }
.dot-amber { background: #f0bd63; }
.dot-green { background: #76c893; }
.preview-body { display: flex; min-height: 292px; }
.preview-side {
    flex: 0 0 74px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 13px;
    border-inline-end: 1px solid var(--border);
    background: #f7f9fc;
}
.side-brand {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2f7bf6, #0f766e);
    opacity: .85;
}
.side-item {
    width: 34px;
    height: 6px;
    border-radius: 4px;
    background: #dce5f0;
}
.side-item.is-active { background: #a9c7fa; }
.preview-main { flex: 1; min-width: 0; padding: 16px 18px; }
.preview-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.preview-head span {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: #e3eaf3;
}
.preview-head span:first-child { width: 70px; background: #b9cdea; }
.preview-head span:nth-child(2) { width: 26px; margin-inline-start: auto; }
.preview-head span:last-child { width: 34px; }
.preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}
.preview-cards div {
    padding: 10px 9px;
    border: 1px solid #eef2f8;
    border-radius: 8px;
    background: #fbfdff;
}
.preview-cards b, .preview-cards i {
    display: block;
    border-radius: 3px;
    background: #d7e3f1;
}
.preview-cards b { width: 58%; height: 5px; }
.preview-cards i { width: 38%; height: 12px; margin-top: 8px; background: #bcd4ef; }
.preview-table {
    display: grid;
    grid-template-columns: 1.2fr .8fr .7fr;
    gap: 8px 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eef2f8;
}
.preview-table span {
    display: block;
    height: 5px;
    border-radius: 3px;
    background: #e1e9f2;
}
.preview-table span:nth-child(3n) { width: 70%; justify-self: end; }
.preview-table span:nth-child(1),
.preview-table span:nth-child(2),
.preview-table span:nth-child(3) { background: #c9d9ea; }

/* ---------- 通用区块 ---------- */
.section { padding: 62px 0; }
.section-head {
    max-width: 640px;
    margin: 0 auto 30px;
    text-align: center;
}
.section-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.35;
    letter-spacing: -.015em;
}
.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}
.features { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.feature-card {
    padding: 24px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: #d7e4f6; box-shadow: 0 12px 28px rgba(18, 32, 51, .08); }
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-blue { background: var(--primary-soft); color: var(--primary); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.feature-card h3 {
    margin: 14px 0 6px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.8;
}
.quick-section { padding-bottom: 76px; }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.quick-card:hover {
    transform: translateY(-2px);
    border-color: #cfe0ff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .10);
}
.quick-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
}
.quick-card span:nth-child(2) { min-width: 0; }
.quick-card b {
    display: block;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
}
.quick-card small {
    display: block;
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.quick-arrow {
    margin-inline-start: auto;
    color: #aab7c9;
    font-size: 11px;
}
.quick-card:hover .quick-arrow { color: var(--primary); }

/* ---------- 前台欢迎页 ---------- */
.welcome-hero .hero-grid {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    text-align: center;
}
.welcome-hero .hero-copy > p { margin-inline: auto; }
.welcome-hero .hero-actions,
.welcome-hero .hero-points { justify-content: center; }

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--white);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 64px;
    color: var(--muted);
    font-size: 11px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .hero { padding: 58px 0 54px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-copy h1 { font-size: 38px; }
    .preview { max-width: 460px; margin: 0 auto; transform: none; }
    .feature-grid, .quick-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .feature-card { padding: 20px; }
    .section { padding: 48px 0; }
}
@media (max-width: 720px) {
    .container { padding: 0 18px; }
    .header-inner { min-height: 64px; gap: 12px; }
    .brand-text small { display: none; }
    .site-nav { display: none; }
    .lang-switch { margin-inline-start: auto; }
    .hero-copy h1 { font-size: 31px; }
    .hero-copy > p { font-size: 14px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 72px; }
}

/* ---------- RTL ---------- */
.front.is-rtl .btn i,
.front.is-rtl .quick-arrow { transform: scaleX(-1); }
.front.is-rtl .preview-bar b { letter-spacing: 0; }
.front.is-rtl .hero-copy h1 { letter-spacing: 0; }
