/* ============================================================
   LabElf — 统一视觉主题
   与 WPF 客户端 (MahApps.Metro + Emerald accent) 风格对齐
   引入此文件后：
     * Bootstrap 4/5 的 primary / nav / btn 自动变 Emerald 绿
     * 卡片 / 表单 / 输入框有一致圆角与柔和阴影
     * 登录页的按钮等直接拿 .labelf-btn，不依赖框架
   ============================================================ */

:root {
    /* 品牌主色 */
    --labelf-accent: #10B981;          /* Tailwind Emerald-500，现代翠绿 */
    --labelf-accent-hover: #059669;    /* Emerald-600 */
    --labelf-accent-active: #047857;   /* Emerald-700 */
    --labelf-accent-soft: #D1FAE5;     /* Emerald-100，高亮底 */
    --labelf-accent-text: #FFFFFF;

    /* 中性色 */
    --labelf-surface: #FAFBFC;         /* 页面底色 */
    --labelf-card: #FFFFFF;            /* 卡片底色 */
    --labelf-divider: #E5E7EB;         /* 分割线 / 卡片边 */
    --labelf-text: #111827;            /* 主文字 */
    --labelf-text-muted: #6B7280;      /* 次文字 */
    --labelf-shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);

    /* 统一圆角 */
    --labelf-radius: 8px;
    --labelf-radius-sm: 4px;

    /* Bootstrap 5 CSS 变量覆盖（让 .btn-primary / .badge-primary / 链接自动变绿） */
    --bs-primary: #10B981;
    --bs-primary-rgb: 16, 185, 129;
    --bs-link-color: #059669;
    --bs-link-hover-color: #047857;
}

/* ── 页面底 ───────────────────────────────────────────────── */
html, body {
    background-color: var(--labelf-surface);
    color: var(--labelf-text);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
                 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar.navbar-labelf {
    background-color: var(--labelf-accent) !important;
    border-bottom: 0 !important;
    box-shadow: var(--labelf-shadow);
}
.navbar.navbar-labelf .navbar-brand,
.navbar.navbar-labelf .nav-link {
    color: #FFFFFF !important;
    font-weight: 500;
}
.navbar.navbar-labelf .navbar-brand {
    font-weight: 600;
    letter-spacing: .02em;
}
.navbar.navbar-labelf .navbar-brand::before {
    content: "✦ ";
    opacity: .85;
}

/* ── 卡片 ────────────────────────────────────────────────── */
.labelf-card {
    background-color: var(--labelf-card);
    border: 1px solid var(--labelf-divider);
    border-radius: var(--labelf-radius);
    box-shadow: var(--labelf-shadow);
    padding: 24px;
}
.labelf-card-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--labelf-text-muted);
    margin: 0 0 12px;
}

/* ── 按钮 ────────────────────────────────────────────────── */
.labelf-btn,
button.labelf-btn,
.btn-primary {
    background-color: var(--labelf-accent) !important;
    border-color: var(--labelf-accent) !important;
    color: var(--labelf-accent-text) !important;
    border-radius: var(--labelf-radius-sm);
    padding: 8px 20px;
    font-weight: 500;
    letter-spacing: .02em;
    transition: background-color .15s ease, border-color .15s ease, transform .05s;
}
.labelf-btn:hover,
button.labelf-btn:hover,
.btn-primary:hover {
    background-color: var(--labelf-accent-hover) !important;
    border-color: var(--labelf-accent-hover) !important;
    color: var(--labelf-accent-text) !important;
}
.labelf-btn:active,
button.labelf-btn:active,
.btn-primary:active {
    background-color: var(--labelf-accent-active) !important;
    border-color: var(--labelf-accent-active) !important;
    transform: translateY(1px);
}
.labelf-btn:disabled,
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ── 输入框 ──────────────────────────────────────────────── */
.labelf-input,
.form-control,
.login__input, .registration__input {
    border: 1px solid var(--labelf-divider) !important;
    border-radius: var(--labelf-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    background-color: #FFF;
    color: var(--labelf-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.labelf-input:focus,
.form-control:focus,
.login__input:focus, .registration__input:focus {
    border-color: var(--labelf-accent) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15) !important;
}

/* ── 链接 ────────────────────────────────────────────────── */
a, a:visited {
    color: var(--labelf-accent-hover);
    text-decoration: none;
}
a:hover {
    color: var(--labelf-accent-active);
    text-decoration: underline;
}

/* ── 语言切换 ────────────────────────────────────────────── */
.language-switch a {
    color: var(--labelf-text-muted) !important;
}
.language-switch a.active {
    color: var(--labelf-accent) !important;
}

/* ── Tab 样式（Bootstrap 4 / 5 nav-tabs 统一） ───────────── */
.nav-tabs {
    border-bottom: 1px solid var(--labelf-divider);
}
.nav-tabs .nav-link {
    color: var(--labelf-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 18px;
    font-weight: 500;
    transition: color .15s, border-color .15s;
}
.nav-tabs .nav-link:hover {
    color: var(--labelf-accent);
    background-color: transparent;
    border-color: transparent transparent var(--labelf-accent-soft);
}
.nav-tabs .nav-link.active {
    color: var(--labelf-accent);
    background-color: transparent;
    border-color: transparent transparent var(--labelf-accent);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--labelf-accent);
    border-color: var(--labelf-accent);
    color: #FFF;
}

/* Tab content 容器做成卡片感 */
.tab-content {
    background-color: var(--labelf-card);
    border: 1px solid var(--labelf-divider);
    border-top: none;
    border-radius: 0 0 var(--labelf-radius) var(--labelf-radius);
    padding: 24px !important;
    box-shadow: var(--labelf-shadow);
}
.tab-content h2 {
    color: var(--labelf-text);
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
}
.tab-content h2 i {
    color: var(--labelf-accent);
    margin-right: 6px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--labelf-divider) !important;
    background-color: transparent;
    color: var(--labelf-text-muted);
    padding: 16px 0;
    font-size: 13px;
}

/* ── 登录/注册卡片（替换 Index.cshtml 里的 inline .login / .registration） ── */
.labelf-auth-card,
.login, .registration, .confirmation {
    background-color: var(--labelf-card);
    color: var(--labelf-text);
    padding: 32px 28px;
    border-radius: var(--labelf-radius);
    width: 360px;
    text-align: center;
    box-shadow: var(--labelf-shadow);
    border: 1px solid var(--labelf-divider);
    box-sizing: border-box;
}
/* 标题栏用 flex 水平排列，图标和文字基线对齐、大小一致 */
.login h2, .registration h2, .confirmation h2, #register h2 {
    color: var(--labelf-text) !important;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.login h2 i, .registration h2 i, .confirmation h2 i {
    font-size: 1em;
    line-height: 1;
    color: var(--labelf-accent);
}
.confirmation i {
    color: var(--labelf-accent) !important;
}

.login-container,
.registration-container,
.confirmation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* 表单内所有控件同宽：input / button 都强制 100%，避免按钮比输入框宽的视觉错位 */
.login__form, .registration-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.login__input,
.registration__input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}
.login__submit,
.registration__submit {
    background-color: var(--labelf-accent) !important;
    color: #FFF !important;
    border: none !important;
    border-radius: var(--labelf-radius-sm);
    padding: 10px 20px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color .15s;
    margin: 0;
}
.login__submit:hover,
.registration__submit:hover {
    background-color: var(--labelf-accent-hover) !important;
}

/* ── 主页 Hero + 特性卡片 ────────────────────────────────── */
.home-hero {
    padding: 32px 8px 28px;
    text-align: center;
    background: linear-gradient(135deg, #ECFDF5 0%, #FFFFFF 70%);
    border-radius: var(--labelf-radius);
    margin-bottom: 28px;
    border: 1px solid var(--labelf-divider);
}
.home-hero h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--labelf-text);
    margin: 0 0 10px;
    letter-spacing: -.01em;
}
.home-hero .home-subtitle {
    font-size: 16px;
    color: var(--labelf-text-muted);
    max-width: 720px;
    margin: 0 auto 20px;
    line-height: 1.65;
}
.home-hero .home-cta {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.home-hero .home-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--labelf-radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s, color .15s, transform .05s;
}
.home-hero .home-cta a.primary {
    background: var(--labelf-accent);
    color: #FFF;
}
.home-hero .home-cta a.primary:hover {
    background: var(--labelf-accent-hover);
    color: #FFF;
    text-decoration: none;
}
.home-hero .home-cta a.secondary {
    background: transparent;
    color: var(--labelf-accent-hover);
    border: 1px solid var(--labelf-divider);
}
.home-hero .home-cta a.secondary:hover {
    background: var(--labelf-accent-soft);
    color: var(--labelf-accent-active);
    text-decoration: none;
}

/* 区块标题：小写间距字，居中下方细线 */
.section-head {
    text-align: center;
    margin: 28px 0 20px;
}
.section-head h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--labelf-accent);
    margin: 0 0 6px;
}
.section-head h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--labelf-text);
    margin: 0;
    /* 覆盖 .tab-content h2 的默认色/尺寸 */
    display: block;
}

/* 特性卡片网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.feature-card {
    background: var(--labelf-card);
    border: 1px solid var(--labelf-divider);
    border-radius: var(--labelf-radius);
    padding: 22px 20px;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.feature-card:hover {
    border-color: var(--labelf-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, .08);
}
.feature-card .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--labelf-accent-soft);
    color: var(--labelf-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}
.feature-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--labelf-text);
    margin: 0 0 6px;
}
.feature-card p {
    font-size: 13px;
    color: var(--labelf-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* 应用场景 / 亮点行 */
.highlight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.highlight-item {
    padding: 18px 16px;
    background: var(--labelf-card);
    border: 1px solid var(--labelf-divider);
    border-left: 3px solid var(--labelf-accent);
    border-radius: var(--labelf-radius);
}
.highlight-item .highlight-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--labelf-accent);
    line-height: 1;
    margin-bottom: 6px;
}
.highlight-item .highlight-text {
    font-size: 13px;
    color: var(--labelf-text-muted);
    line-height: 1.5;
}

/* ── 文件/下载链接图标列表 ───────────────────────────────── */
.tab-content a[href$=".pdf"] i,
.tab-content a[href$=".msi"] i,
.tab-content a[href$=".zip"] i {
    color: var(--labelf-accent);
    margin-right: 4px;
}

/* ── 滚动条（微调） ──────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
