/* ========== Mylan-我的懒粉丝 · 站点样式（清爽卡片风格） ==========
   品牌语义色：--brand-* 默认取懒笔记蓝；给容器加 .theme-bill 即整片切换为懒记账暖橙。
   新增页面只写一次样式，两套产品各自成色。 ========== */
:root {
    /* 懒笔记 · 蓝 */
    --blue-50: #f0f7ff;
    --blue-100: #e0efff;
    --blue-200: #bcdcf8;
    --blue-400: #6fb1e8;
    --blue-500: #3d8fd4;
    --blue-600: #2b7cc0;
    --blue-700: #1f66a3;

    /* 懒记账 · 暖橙 */
    --orange-50: #fff7ee;
    --orange-100: #ffeeda;
    --orange-200: #fcd8b4;
    --orange-400: #fb9a4d;
    --orange-500: #f2751d;
    --orange-600: #dd6410;
    --orange-700: #b64e08;

    --ink: #23455f;
    --ink-light: #5b7a94;
    --white: #ffffff;

    /* 品牌语义色（默认 = 懒笔记蓝） */
    --brand-50: var(--blue-50);
    --brand-100: var(--blue-100);
    --brand-200: var(--blue-200);
    --brand-400: var(--blue-400);
    --brand-500: var(--blue-500);
    --brand-600: var(--blue-600);
    --brand-700: var(--blue-700);
    --brand-rgb: 61, 143, 212;

    --shadow: 0 12px 40px rgba(45, 120, 190, 0.16);
    --shadow-soft: 0 6px 20px rgba(35, 69, 95, 0.08);
    --radius: 16px;
}

/* 懒记账主题：整片切换为暖橙（--shadow 一并重定义，避免继承到蓝色的那层） */
.theme-bill {
    --brand-50: var(--orange-50);
    --brand-100: var(--orange-100);
    --brand-200: var(--orange-200);
    --brand-400: var(--orange-400);
    --brand-500: var(--orange-500);
    --brand-600: var(--orange-600);
    --brand-700: var(--orange-700);
    --brand-rgb: 242, 117, 29;
    --shadow: 0 12px 40px rgba(200, 96, 20, 0.18);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: #f6f9fc;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.dl-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e8eef4;
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-700);
    letter-spacing: 0.5px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex: 0 0 auto;
}

.nav-links { display: flex; gap: 26px; }

.nav-link {
    font-size: 15px;
    color: var(--ink);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.nav-link:hover { color: var(--brand-600); border-bottom-color: var(--brand-400); }

/* 门户导航：两个产品入口各用自家颜色，一眼区分 */
.nav-link-note:hover { color: var(--blue-600); border-bottom-color: var(--blue-400); }
.nav-link-bill:hover { color: var(--orange-600); border-bottom-color: var(--orange-400); }

/* ---------- 通用标题与按钮 ---------- */
.sec-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-700);
    margin: 0 0 10px;
}

.sec-sub {
    text-align: center;
    margin: 0 0 30px;
    font-size: 14px;
    color: var(--ink-light);
}

.btn {
    display: inline-block;
    padding: 12px 34px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    user-select: none;
    font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-client {
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.35);
}

.btn-client:hover { background: var(--brand-600); }

.btn-android {
    background: #fff;
    color: var(--brand-600);
    border: 2px solid var(--brand-400);
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.15);
}

.btn-android:hover { border-color: var(--brand-600); background: var(--brand-50); }

/* 门户：两个产品并列的引导按钮，各自固色 */
.btn-note {
    background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
    color: #fff;
    box-shadow: 0 8px 20px rgba(61, 143, 212, 0.35);
}

.btn-note:hover { background: var(--blue-600); }

.btn-bill {
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    color: #fff;
    box-shadow: 0 8px 20px rgba(242, 117, 29, 0.35);
}

.btn-bill:hover { background: var(--orange-600); }

/* ---------- 产品页（懒笔记 / 懒记账 共用） ---------- */
.dl-head {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 30px;
    text-align: center;
}

.dl-hero-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

.prod-crumb {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--ink-light);
}

.prod-crumb a:hover { color: var(--brand-600); }

.dl-title {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 800;
    color: var(--brand-700);
    letter-spacing: 1px;
}

.dl-subtitle {
    margin: 0 0 14px;
    font-size: 17px;
    color: var(--brand-500);
    letter-spacing: 3px;
}

.dl-intro {
    margin: 0 auto;
    max-width: 620px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink-light);
}

/* 下载区 */
.dl-section { max-width: 1080px; margin: 0 auto; padding: 12px 24px 40px; }

.dl-grid {
    display: flex;
    gap: 26px;
    justify-content: center;
    flex-wrap: wrap;
}

.dl-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 42px 38px 34px;
    width: 380px;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.dl-icon { margin-bottom: 18px; line-height: 0; }

.dl-name {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.dl-desc {
    margin: 0 0 26px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink-light);
    min-height: 50px;
}

.dl-links { margin-top: 18px; display: flex; align-items: center; gap: 10px; }

.dl-ver {
    font-size: 13px;
    color: var(--ink-light);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 999px;
    padding: 5px 14px;
}

.qr-label {
    font-size: 13px;
    color: var(--brand-600);
    background: transparent;
    border: 1px solid var(--brand-200);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: inherit;
    user-select: none;
}

/* 二维码浮层：悬浮于卡片之上（绝对定位不占文档流，显隐不改变卡片与页面尺寸） */
.qr-pop {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    z-index: 30;
    background: #fff;
    border: 1px solid var(--brand-200);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(var(--brand-rgb), 0.22);
    padding: 16px;
    text-align: center;
    max-width: min(260px, calc(100vw - 48px));
}

/* Android 卡片作为二维码浮层定位上下文 */
.dl-card-android { position: relative; }

.qr-canvas { line-height: 0; }
.qr-canvas img, .qr-canvas canvas { display: block; margin: 0 auto; }

.qr-tip {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--ink-light);
}

/* 功能卡片 */
.feat-section { max-width: 1080px; margin: 0 auto; padding: 20px 24px 40px; }

.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 30px 26px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feat-icon { margin-bottom: 14px; line-height: 0; }

.feat-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--brand-700);
}

.feat-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-light);
}

.page-foot {
    padding: 26px 16px 40px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-light);
    opacity: .85;
    line-height: 1.9;
}

.page-foot a:hover { color: var(--brand-600); }

/* ---------- 主页门户 ---------- */
.portal-hero {
    position: relative;
    padding: 72px 24px 60px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #f1f8ff 0%, #f6f9fc 100%);
    border-bottom: 1px solid #eaf0f6;
}

/* 两团柔光：蓝偏左、橙偏右，呼应两个产品 */
.portal-hero::before,
.portal-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.portal-hero::before {
    width: 340px;
    height: 340px;
    left: -90px;
    top: -110px;
    background: rgba(61, 143, 212, 0.30);
}

.portal-hero::after {
    width: 320px;
    height: 320px;
    right: -80px;
    top: -20px;
    background: rgba(242, 117, 29, 0.22);
}

.portal-hero-inner { position: relative; max-width: 780px; margin: 0 auto; }

.portal-badge {
    display: inline-block;
    padding: 6px 16px;
    margin-bottom: 22px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--blue-600);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--blue-100);
    letter-spacing: 1px;
}

.portal-title {
    margin: 0 0 16px;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1px;
    color: var(--blue-700);
}

/* 渐变字：仅在浏览器支持背景裁切时启用，避免不支持时文字不可见 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .portal-title {
        background: linear-gradient(100deg, var(--blue-700) 0%, var(--blue-500) 48%, var(--orange-500) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

.portal-subtitle {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--blue-500);
    letter-spacing: 3px;
}

.portal-intro {
    margin: 0 auto;
    max-width: 660px;
    font-size: 15px;
    line-height: 1.95;
    color: var(--ink-light);
}

.portal-cta {
    margin-top: 32px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.portal-section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 8px;
}

/* 功能区小标题（产品徽标 + 主标题 + 说明） */
.sec-head { text-align: center; margin-bottom: 34px; }

.sec-badge {
    display: inline-block;
    padding: 5px 15px;
    margin-bottom: 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brand-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
}

.sec-head h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    color: var(--brand-700);
}

.sec-head p {
    margin: 0 auto;
    max-width: 620px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--ink-light);
}

.sec-more {
    margin: 32px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-600);
}

.sec-more a { border-bottom: 1px solid transparent; transition: border-color .12s ease; }
.sec-more a:hover { border-bottom-color: var(--brand-400); }

/* 门户功能卡片的图标跟随区块品牌色（懒记账区块自动变橙） */
.portal-section .feat-icon { color: var(--brand-500); }

/* 两个产品卡片 */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #eaf0f6;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 30px 28px 26px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow);
}

.pc-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.pc-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    box-shadow: 0 8px 18px rgba(var(--brand-rgb), 0.30);
}

.pc-title strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-700);
}

.pc-title em {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-style: normal;
    color: var(--ink-light);
}

.pc-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
}

.pc-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-light);
}

.pc-list li + li { margin-top: 9px; }

.pc-list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-400);
}

.pc-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-600);
}

.pc-arrow { transition: transform .16s ease; }
.product-card:hover .pc-arrow { transform: translateX(4px); }

/* 收尾引导条 */
.portal-final {
    max-width: 1080px;
    margin: 56px auto 64px;
    padding: 46px 32px;
    text-align: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #eaf4ff 0%, #fff6ec 100%);
    box-shadow: var(--shadow-soft);
}

.portal-final h2 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    color: var(--blue-700);
}

.portal-final p {
    margin: 0 0 26px;
    font-size: 14px;
    color: var(--ink-light);
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 900px) {
    .feat-grid { grid-template-columns: repeat(2, 1fr); }
    .portal-grid { grid-template-columns: 1fr; }
    .portal-title { font-size: 36px; }
    .portal-hero { padding: 56px 24px 48px; }
}

@media (max-width: 560px) {
    .nav-inner { padding: 0 16px; height: 56px; }
    .brand-name { font-size: 15px; }
    .nav-links { gap: 14px; }
    .nav-link { font-size: 14px; }
    .dl-head { padding: 28px 16px 24px; }
    .dl-title { font-size: 30px; }
    .dl-subtitle { letter-spacing: 2px; font-size: 15px; }
    .dl-intro { font-size: 14px; }
    .dl-section, .feat-section { padding-left: 16px; padding-right: 16px; }
    .dl-card { padding: 32px 22px 28px; width: 100%; }
    .dl-desc { min-height: 0; }
    .feat-grid { grid-template-columns: 1fr; }
    .portal-hero { padding: 46px 16px 40px; }
    .portal-title { font-size: 28px; }
    .portal-subtitle { font-size: 15px; letter-spacing: 2px; }
    .portal-intro { font-size: 14px; }
    .portal-section { padding: 40px 16px 4px; }
    .sec-head h2 { font-size: 21px; }
    .product-card { padding: 24px 20px 22px; }
    .portal-final { margin: 40px 16px 48px; padding: 34px 22px; }
    .portal-final h2 { font-size: 21px; }
    .btn { padding: 11px 26px; font-size: 15px; }
}

/* ========== 后台管理（入口页面沿用蓝色，不做主题切换） ========== */
.admin-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 60px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.admin-head h1 { font-size: 22px; color: var(--blue-700); }

.inline-form { display: inline; }

.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.panel h2 {
    margin: 0 0 16px;
    font-size: 17px;
    color: var(--blue-700);
    border-left: 4px solid var(--blue-400);
    padding-left: 10px;
}

.panel-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-light); flex: 1; }

.field > span { line-height: 1.6; }

.field input[type="text"],
.field input[type="password"],
.field textarea {
    border: 1px solid var(--blue-200);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--ink);
    background: var(--blue-50);
    outline: none;
    height: 40px;
}

.field textarea { height: auto; resize: vertical; }

.field input:focus, .field textarea:focus { border-color: var(--blue-500); background: #fff; }

/* 文件选择框：统一高度与文本输入框对齐，避免并排时错位 */
.field input[type="file"] {
    font-size: 13px;
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--blue-200);
    border-radius: 8px;
    background: var(--blue-50);
    color: var(--ink-light);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row .field { min-width: 240px; }

/* ===== 兼容回退：旧内核浏览器（Chrome<84 / Edge<84 / 国产双核兼容模式）不支持 flex gap，
   用相邻外边距模拟间距，避免表单元素紧贴造成“重叠 / 错位 / 拥挤” ===== */
.panel-form > * + * { margin-top: 14px; }
.field > * + * { margin-top: 6px; }
.field-row { margin-left: -8px; margin-right: -8px; }
.field-row > .field { margin-left: 8px; margin-right: 8px; }

@supports (gap: 1px) {
    .panel-form > * + * { margin-top: 0; }
    .field > * + * { margin-top: 0; }
    .field-row { gap: 16px; margin-left: 0; margin-right: 0; }
    .field-row > .field { margin-left: 0; margin-right: 0; }
}

.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--blue-400);
    color: var(--blue-600);
    padding: 8px 18px;
    font-size: 14px;
}

.btn-block { width: 100%; }

.alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-ok { background: #e8f8ee; color: #1d7a44; border: 1px solid #bfe8cf; }
.alert-error { background: #fdeeee; color: #b03a3a; border: 1px solid #f2c4c4; }

.muted { color: var(--ink-light); font-size: 14px; }

.panel-tip {
    background: var(--blue-50);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--ink-light);
    word-break: break-all;
}

.panel-tip code, .panel-preview code { color: var(--blue-700); }

.panel-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    border: 1px solid var(--blue-200);
    margin-bottom: 10px;
}

.panel-preview p { font-size: 13px; color: var(--ink-light); }

/* 登录页 */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    width: 380px;
    max-width: 100%;
    padding: 36px 34px;
    text-align: center;
}

.login-card h1 { margin: 0 0 6px; font-size: 22px; color: var(--blue-700); }

.login-sub { margin: 0 0 22px; font-size: 13px; color: var(--ink-light); }

.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

.login-tip { margin: 18px 0 0; font-size: 12px; color: var(--ink-light); }
