:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #182235;
    --muted: #667085;
    --line: #dfe6f0;
    --brand: #0f766e;
    --brand-dark: #0b5f59;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #16a34a;
    --shadow: 0 12px 30px rgba(24, 34, 53, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
}
.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-link {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}
.nav-link.active, .nav-link:hover { background: #eaf4f2; color: var(--brand-dark); }
.page { padding: 28px 0 52px; min-height: calc(100vh - 132px); }
.site-footer {
    border-top: 1px solid var(--line);
    padding: 22px 0;
    color: var(--muted);
    background: #fff;
    font-size: 14px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 32px;
}
.hero > div:first-child, .stats, .card, .auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.hero > div:first-child { padding: 42px; }
.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-weight: 700;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; }
.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    overflow: hidden;
}
.stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: #fff;
}
.stats strong { font-size: 30px; }
.stats span { color: var(--muted); }

.section-head, .page-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 28px 0 14px;
}
.page-title { align-items: start; flex-direction: column; }
.page-title p, .muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 12px; }
.card {
    padding: 20px;
    border-radius: 8px;
}
.listing-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
}
.listing-card h3 a { color: var(--text); }
.listing-card p { color: var(--muted); }
.card-top, .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}
.meta { margin-top: auto; padding-top: 14px; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #edf2f7;
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-hot { background: #ffedd5; color: #9a3412; }
.empty { color: var(--muted); text-align: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
}
.btn:hover { background: #f8fafc; color: var(--text); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.btn-xs { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.btn.danger, .danger { color: var(--danger); }

.auth-card, .form-card { max-width: 720px; margin: 0 auto; padding: 28px; }
.form { display: grid; gap: 14px; }
.form.compact { max-width: 520px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    border: 1px solid #cfd8e5;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 10px;
    margin-bottom: 18px;
}
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0 24px;
}
.account-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.points {
    text-align: center;
    min-width: 96px;
}
.points strong { display: block; font-size: 30px; color: var(--brand); }
.points span { color: var(--muted); }
.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.row-actions, .inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.detail { display: grid; gap: 16px; max-width: 880px; }
.info-list {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 10px 16px;
    margin: 18px 0 0;
}
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }
.preline { white-space: pre-line; }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: #fff;
}
.alert-success { background: #ecfdf3; border-color: #bbf7d0; }
.alert-warning { background: #fffbeb; border-color: #fde68a; }
.alert-danger { background: #fef2f2; border-color: #fecaca; }

.admin-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.admin-tabs a {
    padding: 7px 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}
.admin-tabs a:hover {
    border-color: #b9d9d5;
    background: #eaf4f2;
    color: var(--brand-dark);
}
.admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.admin-shortcut { color: var(--text); }
.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: 14px; color: var(--muted); }
td { font-size: 15px; }
.points-input { width: 88px; min-height: 30px; padding: 4px 8px; }
.inline-actions .btn,
.row-actions .btn {
    box-shadow: none;
}
.wide-form {
    max-width: 980px;
}
.seo-fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
}
.seo-fieldset legend {
    padding: 0 8px;
    font-weight: 700;
    color: var(--brand-dark);
}
.bulk-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    max-width: 520px;
}
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}
.category-pills a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}
.category-pills a.active,
.category-pills a:hover {
    background: #eaf4f2;
    color: var(--brand-dark);
    border-color: #b9d9d5;
}
.category-pills span {
    color: var(--muted);
}
.article-row h2 {
    margin-top: 8px;
}
.article-row h2 a {
    color: var(--text);
}
.article-content {
    font-size: 17px;
}

@media (max-width: 820px) {
    .container { width: min(100% - 24px, 1120px); }
    .header-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
    .nav { justify-content: flex-start; }
    .hero { grid-template-columns: 1fr; }
    .hero > div:first-child { padding: 26px; }
    h1 { font-size: 28px; }
    .cards { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .item-row, .account-summary { align-items: flex-start; flex-direction: column; }
    .stats, .admin-stats { grid-template-columns: 1fr; }
    .bulk-bar { display: grid; max-width: none; }
}
