:root {
    --sky-50:  #f0f8ff;
    --sky-100: #e1f1fd;
    --sky-200: #bfe3fb;
    --sky-300: #8ccff7;
    --sky-400: #4db4f0;
    --sky-500: #1e9ee6;   /* primary */
    --sky-600: #1481c4;
    --sky-700: #14679c;
    --ink:     #1f2d3d;
    --muted:   #6b7c8f;
    --line:    #dce8f3;
    --white:   #ffffff;
    --ok:      #1faa59;
    --warn:    #c98a00;
    --danger:  #d2453a;
    --radius:  14px;
    --shadow:  0 10px 30px rgba(30, 158, 230, .12);
    --shadow-sm: 0 3px 10px rgba(30, 158, 230, .10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 70% -10%, var(--sky-100), transparent 60%),
        linear-gradient(180deg, var(--sky-50), #ffffff 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--sky-600); text-decoration: none; }
code { font-family: "SF Mono", Consolas, monospace; background: var(--sky-50); padding: 2px 6px; border-radius: 6px; }

/* ---- header / footer ---- */
.site-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; max-width: 1080px; margin: 0 auto; width: 100%;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.brand-mark { color: var(--sky-500); display: inline-flex; }
.brand-mark svg { width: 26px; height: 26px; display: block; }
.site-nav a { margin-left: 22px; color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--sky-600); }

.container { max-width: 1080px; margin: 0 auto; padding: 12px 28px 60px; width: 100%; flex: 1; }

.site-footer { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; border-top: 1px solid var(--line); }

/* ---- flashes ---- */
.flashes { margin: 14px 0; display: grid; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid transparent; }
.flash-error   { background: #fdeceb; color: var(--danger); border-color: #f6c9c5; }
.flash-success { background: #e9f8f0; color: var(--ok); border-color: #bfe8d2; }
.flash-info    { background: var(--sky-50); color: var(--sky-700); border-color: var(--sky-200); }

/* ---- hero ---- */
.hero {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
    padding: 40px 0 24px;
}
.hero-text h1 { font-size: 40px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.5px; }
.hero-sub { font-size: 17px; color: var(--muted); line-height: 1.7; margin: 0 0 26px; max-width: 520px; }
.register-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.register-form input {
    flex: 1 1 220px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
    font-size: 15px; background: var(--white); outline: none; transition: border-color .15s, box-shadow .15s;
}
.register-form input:focus { border-color: var(--sky-400); box-shadow: 0 0 0 4px var(--sky-100); }
.register-form button {
    padding: 14px 26px; border: none; border-radius: 12px; cursor: pointer;
    background: linear-gradient(180deg, var(--sky-400), var(--sky-500));
    color: #fff; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .15s;
}
.register-form button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.register-form .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 26px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(180deg, var(--sky-400), var(--sky-500));
    color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap;
    text-decoration: none; box-shadow: var(--shadow-sm);
    transition: transform .12s, box-shadow .15s;
}
.register-form .btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }
.hero-hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

.hero-art { display: flex; justify-content: center; }
.cloud-card {
    width: 260px; padding: 34px; border-radius: 24px; background: var(--white);
    box-shadow: var(--shadow); border: 1px solid var(--sky-100); text-align: center;
}
.cloud-icon { width: 84px; height: 84px; color: var(--sky-400); }
.dog-icon { width: 104px; height: 104px; }
.logo-icon { width: 116px; height: 116px; transform: rotate(45deg); }
.cloud-lines { display: grid; gap: 10px; margin: 22px 6px; }
.cloud-lines span { height: 10px; border-radius: 6px; background: var(--sky-100); }
.cloud-lines span:nth-child(2) { width: 80%; }
.cloud-lines span:nth-child(3) { width: 55%; }
.cloud-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--sky-50); color: var(--sky-600); font-weight: 600; font-size: 13px; }

/* ---- sections ---- */
section h2 { font-size: 24px; margin: 8px 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 22px; }
.steps, .downloads, .donate { margin-top: 48px; }

/* ---- donate ---- */
.donate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 540px; }
.donate-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; text-align: center; }
.donate-head { font-weight: 700; font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.donate-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-wechat { background: #07c160; }
.dot-alipay { background: #1677ff; }
.qr-box { background: var(--sky-50); border-radius: 10px; padding: 10px; }
.qr-box img { display: block; width: 100%; max-width: 200px; margin: 0 auto; border-radius: 6px; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
@media (max-width: 560px) { .donate-grid { grid-template-columns: 1fr; max-width: 320px; } }
.donate-account { margin-top: 34px; }
.donate-account h3 { font-size: 18px; margin: 0 0 4px; }

.step-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.step-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sky-500); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step-list strong { display: block; margin-bottom: 4px; }
.step-list p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- downloads ---- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.download-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 20px; text-align: center; color: var(--ink);
    box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s, border-color .15s;
}
.download-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sky-200); }
.dl-icon { height: 52px; display: flex; align-items: center; justify-content: center; color: var(--sky-600); }
.dl-icon svg { width: 44px; height: 44px; display: block; }
.dl-name { font-weight: 700; font-size: 18px; margin: 8px 0 4px; }
.dl-action { color: var(--sky-600); font-size: 14px; font-weight: 600; }
.downloads-compact { margin-top: 34px; }
.downloads-compact .download-card { padding: 16px; }
.downloads-compact .dl-icon { height: 38px; }
.downloads-compact .dl-icon svg { width: 30px; height: 30px; }
.downloads-compact .dl-name { font-size: 15px; margin: 6px 0 0; }

/* ---- account ---- */
.account { max-width: 720px; margin: 20px auto; }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.account-head h1 { margin: 0; font-size: 28px; }
.head-logout { margin-left: auto; }
.head-logout .btn-ghost { padding: 7px 14px; font-size: 13px; }
.row-link { color: var(--sky-600); font-weight: 500; font-size: 14px; }
.badge { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-active { background: #e9f8f0; color: var(--ok); }
.badge-pending { background: #fdf3e0; color: var(--warn); }
.badge-disabled { background: #f1f3f5; color: var(--muted); }

.info-card, .cta-card, .guide-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 24px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--muted); }

.cta-card h2 { margin: 0 0 8px; font-size: 20px; }
.cta-card p { color: var(--muted); margin: 0 0 18px; }
.cta-muted { background: var(--sky-50); border-style: dashed; }
.cta-muted p { margin-bottom: 0; }

.btn-primary {
    display: inline-block; padding: 13px 24px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(180deg, var(--sky-400), var(--sky-500)); color: #fff;
    font-weight: 600; font-size: 15px; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }

.guide-card h3 { margin: 0 0 12px; }
.guide-card ol { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.bookmark-note { background: var(--sky-50); border: 1px solid var(--sky-200); color: var(--sky-700); padding: 14px 18px; border-radius: 12px; font-size: 14px; margin: 6px 0 30px; }

/* ---- auth ---- */
.auth-wrap { display: grid; place-items: center; padding: 50px 0; }
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 34px; width: 360px; max-width: 100%; display: grid; gap: 16px; }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; text-align: center; }
.auth-sub { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.resend-form { text-align: center; margin-top: 16px; }
.link-btn { background: none; border: none; color: var(--sky-600); cursor: pointer; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }
.auth-card label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.auth-card input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; outline: none; }
.auth-card input:focus { border-color: var(--sky-400); box-shadow: 0 0 0 4px var(--sky-100); }

/* ---- admin ---- */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); color: var(--muted); font-size: 14px; }
.stat span { display: block; font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 4px; }
.stat-pending span { color: var(--warn); }
.stat-active span { color: var(--ok); }
.stat-disabled span { color: var(--muted); }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.btn-ghost { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; cursor: pointer; color: var(--muted); }
.btn-ghost:hover { border-color: var(--sky-300); color: var(--sky-600); }
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.user-table { width: 100%; border-collapse: collapse; }
.user-table th, .user-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.user-table th { background: var(--sky-50); color: var(--sky-700); font-weight: 600; }
.user-table tr:last-child td { border-bottom: none; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.btn-sm { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 13px; color: var(--ink); }
.btn-sm:hover { border-color: var(--sky-300); }
.btn-approve { background: var(--sky-500); color: #fff; border-color: var(--sky-500); }
.btn-approve:hover { background: var(--sky-600); }
.btn-danger { color: var(--danger); border-color: #f0c4c0; }
.btn-danger:hover { background: #fdeceb; }
.btn-link { color: var(--sky-600); }

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .step-list, .download-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 32px; }
}

/* ---- user guide ---- */
.guide { max-width: 860px; margin: 14px auto 50px; }
.guide-head { margin-bottom: 24px; }
.guide-head h1 { font-size: 30px; margin: 0 0 8px; }
.guide-head p { color: var(--muted); margin: 0; font-size: 16px; }

.flow { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 18px; margin-bottom: 28px; }
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 9px; flex: 1; text-align: center; }
.flow-icon { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(180deg, var(--sky-400), var(--sky-500)); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.flow-icon svg { width: 26px; height: 26px; }
.flow-step span { font-size: 13px; color: var(--ink); font-weight: 500; }
.flow-arrow { align-self: center; color: var(--sky-300); margin-top: 14px; }
.flow-arrow svg { width: 20px; height: 20px; display: block; }

.guide-step { display: flex; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 18px; }
.guide-step-plain { align-items: flex-start; }
.step-badge { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg, var(--sky-400), var(--sky-500)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.step-icon-q { flex: none; width: 38px; height: 38px; color: var(--sky-500); }
.step-icon-q svg { width: 38px; height: 38px; }
.step-body { flex: 1; min-width: 0; }
.step-body h2 { font-size: 20px; margin: 2px 0 12px; }
.step-body ol, .step-body ul { margin: 0; padding-left: 20px; line-height: 1.9; color: var(--ink); }
.step-body li { margin-bottom: 4px; }
.step-lead { margin: 14px 0 6px; color: var(--ink); }
.tick-list { list-style: none; padding-left: 0; }
.tick-list li { position: relative; padding-left: 24px; margin-bottom: 10px; line-height: 1.7; }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky-400); }

.guide-note { background: var(--sky-50); border: 1px solid var(--sky-200); color: var(--sky-700); border-radius: 10px; padding: 12px 16px; margin-top: 14px; font-size: 14px; line-height: 1.7; }
.guide-note.warn { background: #fdf3e0; border-color: #f3d9a8; color: #9a6a00; }

.import-illus { display: flex; align-items: center; justify-content: center; gap: 20px; background: var(--sky-50); border-radius: 12px; padding: 20px; margin: 8px 0 18px; }
.illus-file, .illus-app { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.illus-file { color: var(--sky-700); }
.illus-file svg { width: 44px; height: 44px; }
.illus-app { color: var(--ok); }
.illus-app svg { width: 52px; height: 52px; background: var(--ok); border-radius: 14px; padding: 10px; box-sizing: border-box; }
.illus-arrow { width: 32px; height: 32px; color: var(--sky-400); }

.faq dt { font-weight: 600; margin-top: 14px; color: var(--ink); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; color: var(--muted); line-height: 1.7; }

.guide-support { text-align: center; background: var(--sky-50); border: 1px dashed var(--sky-200); border-radius: var(--radius); padding: 16px; color: var(--sky-700); font-size: 14px; margin-top: 8px; }

@media (max-width: 680px) {
    .flow { flex-wrap: wrap; justify-content: center; gap: 16px 10px; }
    .flow-arrow { display: none; }
    .flow-step { flex: 0 0 27%; }
}
