/* 体质食养管家 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(160deg, #f6f4ef 0%, #eef3ea 100%);
    color: #333;
    line-height: 1.7;
}
a { color: #2e7d32; }

.hero {
    background: linear-gradient(135deg, #2e5d34 0%, #4b8b3b 60%, #7bb661 100%);
    color: #fff;
    text-align: center;
    padding: 42px 16px 34px;
}
.hero h1 { font-size: 30px; letter-spacing: 2px; }
.hero .sub { margin-top: 8px; opacity: .92; font-size: 14px; }

.wrap { max-width: 1000px; margin: 24px auto 60px; padding: 0 16px; }

.card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(60, 90, 60, .08);
}
.card h2 { font-size: 21px; margin-bottom: 12px; color: #2e5d34; }
.card h3 { font-size: 18px; margin-bottom: 12px; color: #2e5d34; border-left: 4px solid #7bb661; padding-left: 10px; }
.card h4 { font-size: 15px; margin-bottom: 6px; color: #556b2f; }

/* 表单 */
.form-card h2 { text-align: center; }
.form { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: flex-end; }
.form label { font-size: 14px; color: #555; display: flex; flex-direction: column; gap: 6px; }
.form input, .form select {
    padding: 10px 12px; border: 1px solid #cdd8c6; border-radius: 8px;
    font-size: 15px; background: #fbfdf9; min-width: 200px;
}
.form button {
    padding: 11px 30px; border: none; border-radius: 8px; cursor: pointer;
    background: #4b8b3b; color: #fff; font-size: 16px; transition: background .2s;
}
.form button:hover { background: #3c6f2f; }
.error { color: #c0392b; text-align: center; margin-top: 10px; }

/* 结果头卡 */
.hero-card { display: flex; align-items: center; gap: 26px; background: linear-gradient(120deg, #fffdf5, #f2f8ec); }
.trigram {
    font-size: 84px; color: #2e5d34; line-height: 1;
    background: #e8f2e0; border-radius: 50%; width: 128px; height: 128px;
    display: flex; align-items: center; justify-content: center; flex: none;
    box-shadow: inset 0 0 0 3px #7bb661;
}
.hero-main h2 { font-size: 24px; }
.hero-main .hl { color: #b03a2e; }
.tag { color: #666; font-size: 14px; margin-top: 4px; }
.motto { margin-top: 10px; color: #4b8b3b; font-style: italic; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .hero-card { flex-direction: column; text-align: center; } }

.info { width: 100%; border-collapse: collapse; font-size: 14px; }
.info th { text-align: left; color: #666; width: 92px; padding: 6px 8px 6px 0; vertical-align: top; white-space: nowrap; }
.info td { padding: 6px 0; }
.info tr { border-bottom: 1px dashed #e4ead9; }

.advice { background: #fafcf7; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.advice ul { list-style: none; }
.advice li { padding: 3px 0 3px 18px; position: relative; font-size: 14px; }
.advice li::before { content: "•"; position: absolute; left: 4px; color: #7bb661; }
.advice.ok { background: #f0f7ec; }
.advice.ok li::before { color: #4b8b3b; }
.advice.no { background: #fdf4ee; }
.advice.no li::before { color: #c0392b; }

.date-tag { font-size: 12px; color: #999; font-weight: normal; margin-left: 8px; }
.blood-tip { margin-top: 6px; font-size: 14px; color: #7a5c2e; background: #fbf6ea; padding: 8px 12px; border-radius: 8px; }
.season { color: #4b8b3b; background: #f0f7ec; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.principle { color: #2e5d34; font-weight: bold; margin-bottom: 8px; }
.fulllist { list-style: none; }
.fulllist li { padding: 2px 0 2px 16px; position: relative; font-size: 14px; }
.fulllist li::before { content: "❋"; position: absolute; left: 0; color: #7bb661; }
.note { font-size: 12px; color: #999; margin-top: 10px; }

.term-card p { margin: 4px 0; font-size: 14px; }

.foot { text-align: center; color: #888; font-size: 13px; padding: 20px; }

/* 后台 */
.admin-nav { background: #2e5d34; padding: 0 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-nav .brand { color: #fff; font-weight: bold; padding: 12px 14px 12px 0; }
.admin-nav a { color: #d8e8cf; text-decoration: none; padding: 12px 14px; display: inline-block; }
.admin-nav a:hover, .admin-nav a.active { background: #4b8b3b; color: #fff; }
.admin-nav .spacer { flex: 1; }

.login-box { max-width: 380px; margin: 90px auto; }
.login-box .form { flex-direction: column; align-items: stretch; }
.login-box .form input { min-width: 0; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; }
table.list th { background: #f4f8f0; color: #2e5d34; }
table.list tr:hover td { background: #fafcf7; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: linear-gradient(120deg, #e8f2e0, #f6fbf1); border-radius: 12px; padding: 16px 18px; }
.stat .num { font-size: 30px; font-weight: bold; color: #2e5d34; }
.stat .lbl { font-size: 13px; color: #666; }

textarea.advedit { width: 100%; min-height: 110px; padding: 10px; border: 1px solid #cdd8c6; border-radius: 8px; font-size: 14px; font-family: inherit; }
.btn2 { padding: 8px 22px; border: none; border-radius: 8px; cursor: pointer; background: #4b8b3b; color: #fff; font-size: 14px; }
.btn2.gray { background: #90a4ae; }
.btn2.red { background: #c0392b; }
.flash-ok { background: #e8f5e9; color: #2e7d32; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.bar { background: #e0e0e0; border-radius: 6px; height: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #4b8b3b; }
