/* ==========================================================
   昆山生活网 · PHP 版统一皮肤
   色板：深蓝 #0f2b46 / 主蓝 #1f6fe0 / 强调橙 #e6542f
   ========================================================== */

:root {
    --navy: #0f2b46;
    --navy-deep: #0b2138;
    --blue: #1f6fe0;
    --blue-dark: #1557b8;
    --orange: #e6542f;
    --orange-light: #f2733f;
    --bg: #f2f5f9;
    --card: #ffffff;
    --line: #e8eef5;
    --text: #1c2733;
    --muted: #8b98a8;
    --weak: #a9b5c4;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(15, 43, 70, .04), 0 6px 18px rgba(15, 43, 70, .04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; }

.wrap { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; }

/* ---------------- 头部 ---------------- */
.hdr { background: #fff; box-shadow: 0 1px 0 var(--line); }

.topbar {
    height: 36px;
    background: var(--navy);
    color: #b9c7d6;
    font-size: 13px;
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar a { color: #b9c7d6; }
.topbar a:hover { color: #fff; }
.topbar .sep { margin: 0 8px; color: #4b637c; }

.hmain { height: 96px; }
.hmain-in { display: flex; align-items: center; gap: 24px; height: 96px; }

.logo { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.logo-mark {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f6fe0, #0f56b3);
    color: #fff; font-size: 26px; font-weight: 700;
    letter-spacing: 0;
}
.logo-mark.sm { width: 30px; height: 30px; font-size: 16px; border-radius: 8px; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.2; }
.logo-txt strong { font-size: 28px; font-weight: 700; letter-spacing: 3px; color: var(--navy); }
.logo-txt i { font-style: normal; font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }

.search { flex: 1 1 auto; display: flex; height: 44px; max-width: 560px; }
.search input {
    flex: 1 1 auto; height: 44px; padding: 0 20px;
    border: 1px solid #d9e3ef; border-right: 0;
    border-radius: 24px 0 0 24px;
    font-size: 15px; color: var(--text); outline: none; background: #fff;
}
.search input:focus { border-color: var(--blue); }
.search button {
    width: 84px; height: 44px; border: 0;
    background: var(--blue); color: #fff;
    border-radius: 0 24px 24px 0;
    font-size: 15px; cursor: pointer;
}
.search button:hover { background: var(--blue-dark); }

.publish {
    flex: 0 0 auto;
    height: 44px; padding: 0 26px;
    display: flex; align-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: #fff; font-size: 15px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(230, 84, 47, .25);
}
.publish:hover { color: #fff; filter: brightness(1.03); }

.nav { background: var(--navy); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 50px; }
.navlist { display: flex; align-items: center; height: 50px; }
.navlist li { height: 50px; }
.navlist a {
    display: flex; align-items: center; height: 50px;
    padding: 0 22px;
    color: #dbe7f4; font-size: 16px;
}
.navlist a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.navlist a.on { color: #fff; background: var(--blue); }
.navlist li:first-child a { padding-left: 18px; }
.tel { color: #8ba6c0; font-size: 13px; }

/* ---------------- 通用模块 ---------------- */
.main { padding: 20px 0 40px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.sec-t {
    display: flex; align-items: center; justify-content: flex-start;
    font-size: 19px; font-weight: 700; color: var(--navy);
    padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.sec-t::before {
    content: ""; width: 4px; height: 18px;
    background: var(--blue); border-radius: 2px;
    margin-right: 10px;
}
.sec-t > span:first-child { flex: 1 1 auto; }
.sec-t.with-more { display: flex; }
.sec-t.with-more a, .sec-t .count { font-size: 13px; font-weight: 400; color: var(--muted); }
.sec-t.with-more a:hover { color: var(--blue); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 20px;
    border: 0; border-radius: 20px;
    font-size: 14px; cursor: pointer;
    background: #eef3fa; color: var(--navy);
}
.btn:hover { background: #e3ecf8; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn-block { width: 100%; height: 44px; }
.btn-mini { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 14px; }

.flash {
    margin: 12px 0; padding: 10px 16px;
    border-radius: 8px; font-size: 14px;
}
.flash-success { background: #e8f6ee; color: #1a7f4b; border: 1px solid #cbeada; }
.flash-error { background: #fdecea; color: #b3352a; border: 1px solid #f7cfc8; }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.empty-mini { color: var(--weak); font-size: 13px; padding: 10px 0; }

/* ---------------- 首页 ---------------- */
.quick {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 12px; margin-bottom: 16px;
}
.quick-item {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; display: flex; flex-direction: column;
    position: relative;
}
.quick-item em { font-style: normal; font-size: 17px; font-weight: 700; color: var(--navy); }
.quick-item span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.quick-item b {
    position: absolute; right: 16px; top: 14px;
    font-size: 20px; color: var(--blue); font-weight: 700;
}
.quick-item:hover em { color: var(--blue); }
.quick-inline { grid-template-columns: repeat(3, 1fr); }

.grid3 {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    gap: 16px;
    margin-bottom: 16px;
}
.col.side .card:last-child { margin-bottom: 0; }

.hero { padding: 0; overflow: hidden; }
.hero-link { display: flex; gap: 18px; padding: 20px; color: inherit; }
.hero-link:hover { color: inherit; }
.hero-body { flex: 1 1 auto; min-width: 0; }
.hero-body h2 { font-size: 22px; line-height: 1.45; margin: 8px 0 8px; color: var(--navy); }
.hero-body p { margin: 0 0 10px; color: #5b6b7c; font-size: 14px; }
.hero-body .meta { font-size: 12px; color: var(--weak); }
.hero-img {
    flex: 0 0 300px; height: 180px; border-radius: 10px;
    background-size: cover; background-position: center;
}
.tag {
    display: inline-block; padding: 2px 10px;
    background: #eaf2fe; color: var(--blue);
    font-size: 12px; border-radius: 10px;
}

.news-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed #eef2f7;
    font-size: 14px;
}
.news-list li:last-child { border-bottom: 0; }
.news-list a { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list a:hover { color: var(--blue); }
.news-list .date { flex: 0 0 auto; color: var(--weak); font-size: 12px; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-item {
    background: #f8fafd; border: 1px solid transparent;
    border-radius: 10px; padding: 12px 14px;
    display: block; color: inherit;
}
.info-item:hover { background: #fff; border-color: #dbe6f5; box-shadow: var(--shadow); }
.info-item h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.5; }
.info-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--weak); flex-wrap: wrap; }
.info-foot .price { color: var(--orange); font-weight: 700; }
.info-foot .time { margin-left: auto; }

.job-list li, .house-list li { padding: 10px 0; border-bottom: 1px dashed #eef2f7; }
.job-list li:last-child, .house-list li:last-child { border-bottom: 0; }
.job-list a, .house-list a { color: var(--text); font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-list a:hover, .house-list a:hover { color: var(--blue); }
.job-foot, .house-foot {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--muted); margin-top: 4px;
}
.job-foot .company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.job-foot .salary, .house-foot b { color: var(--orange); font-weight: 700; }

.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shop-item {
    display: flex; gap: 12px; align-items: center;
    padding: 14px; border-radius: 10px; background: #f8fafd;
    color: inherit;
}
.shop-item:hover { background: #fff; box-shadow: var(--shadow); }
.shop-logo {
    flex: 0 0 44px; height: 44px; border-radius: 10px;
    background: linear-gradient(135deg, #eaf2fe, #d6e6fb);
    color: var(--blue); font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.shop-info h4 { margin: 0; font-size: 14px; color: var(--text); }
.shop-info p { margin: 2px 0 0; font-size: 12px; color: var(--weak); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.publish-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.publish-card p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

.cat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tags a {
    padding: 6px 12px; border-radius: 16px;
    background: #f2f6fb; color: #46586c; font-size: 13px;
}
.cat-tags a:hover { background: #e6f0fe; color: var(--blue); }

.stat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-list li { background: #f8fafd; border-radius: 10px; padding: 10px 12px; }
.stat-list span { display: block; font-size: 12px; color: var(--muted); }
.stat-list b { font-size: 20px; color: var(--navy); }
.stat-4 { grid-template-columns: repeat(3, 1fr); }
.stat-list i { display: block; font-style: normal; font-size: 12px; color: var(--orange); }

/* ---------------- 列表 ---------------- */
.crumb { font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--blue); }

.filter-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.filter-row > label { flex: 0 0 44px; color: var(--muted); font-size: 13px; padding-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
    padding: 4px 12px; border-radius: 14px;
    font-size: 13px; color: #46586c; background: #f5f8fc;
}
.chips a.on { background: var(--blue); color: #fff; }
.chips a:hover { color: var(--blue); }
.chips a.on:hover { color: #fff; }

.filter-search { display: flex; gap: 10px; margin-top: 10px; max-width: 520px; }
.filter-search input {
    flex: 1 1 auto; height: 40px; padding: 0 16px;
    border: 1px solid var(--line); border-radius: 20px; outline: none;
}
.filter-search input:focus { border-color: var(--blue); }

.row-list li { padding: 14px 0; border-bottom: 1px solid #f1f5fa; }
.row-list li:last-child { border-bottom: 0; }
.row-list li.row-li { display: flex; gap: 14px; align-items: flex-start; }
.row-thumb {
    flex: 0 0 auto; width: 104px; height: 78px; border-radius: 8px;
    overflow: hidden; background: #f3f7fc; border: 1px solid #eef3f8;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-li .row-main { flex: 1 1 auto; min-width: 0; }
.row-list h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-main a { color: inherit; }
.row-main a:hover { color: var(--blue); }
.row-meta { display: flex; gap: 14px; font-size: 12px; color: var(--weak); flex-wrap: wrap; }
.row-meta .price { color: var(--orange); font-weight: 700; }
.row-desc { margin: 6px 0 0; font-size: 13px; color: #7b8896; line-height: 1.6; }
.top-flag { background: var(--orange); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 400; }
.tag-line { color: var(--blue); }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 400; }
.badge-0 { background: #fff4e6; color: #ad6b13; }
.badge-1 { background: #e8f6ee; color: #1a7f4b; }
.badge-2 { background: #f1f3f6; color: #7b8896; }
.inline-form { display: inline; }

.pager { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; padding-top: 18px; font-size: 13px; color: var(--muted); }
.pager-gap { padding: 0 2px; color: var(--weak); }
.pager a { padding: 6px 14px; border-radius: 16px; background: #f5f8fc; color: #46586c; }
.pager a.on, .pager a:hover { background: var(--blue); color: #fff; }

/* ---------------- 详情 ---------------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.detail h1 { font-size: 24px; line-height: 1.45; margin: 0 0 10px; color: var(--navy); }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--weak); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.kv {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px; margin: 16px 0; padding: 16px;
    background: #f8fafd; border-radius: 10px;
}
.kv label { display: block; font-size: 12px; color: var(--muted); }
.kv b { font-size: 15px; color: var(--text); }
.kv .price { color: var(--orange); font-size: 18px; }
.detail-body { font-size: 15px; line-height: 1.9; color: #2b3a49; }
.detail-body img { border-radius: 8px; }
.detail-pics { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.detail-pics img {
    width: 180px; height: 135px; object-fit: cover; display: block;
    border-radius: 8px; border: 1px solid #eef3f8; background: #f3f7fc;
}
.contact-box {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-top: 20px; padding: 16px;
    background: #f0f6ff; border-radius: 10px;
}
.contact-box label { display: block; font-size: 12px; color: var(--muted); }
.contact-box b { font-size: 18px; color: var(--navy); }
.detail-tip { margin-top: 14px; font-size: 12px; color: var(--weak); }
.side-related { position: sticky; top: 16px; }

/* ---------------- 表单 ---------------- */
.form-card { max-width: 860px; }
.form-tip { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.form .field { margin-bottom: 14px; }
.form label { display: block; font-size: 13px; color: #55657a; margin-bottom: 6px; }
.form label i { color: var(--orange); font-style: normal; }
.form input[type="text"], .form input[type="password"], .form input[type="email"], .form input[type="number"],
.form select, .form textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 8px;
    font-size: 14px; color: var(--text); background: #fff;
    outline: none; font-family: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); }
.form textarea { resize: vertical; line-height: 1.7; }
.form input:disabled { background: #f5f7fa; color: var(--muted); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 12px; margin-top: 18px; }

.auth-wrap { display: flex; justify-content: center; padding: 30px 0; }
.auth-card { width: 420px; padding: 30px; }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; color: var(--navy); }
.auth-sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot .sep { margin: 0 8px; color: #d5dde7; }

.error-page { text-align: center; padding: 60px 20px; }
.error-page h2 { font-size: 48px; color: var(--navy); margin: 0 0 8px; }

/* ---------------- 会员中心 ---------------- */
.member-head { display: flex; align-items: center; gap: 18px; }
.avatar {
    flex: 0 0 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #1f6fe0, #0f56b3);
    color: #fff; font-size: 26px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.member-info { flex: 1 1 auto; }
.member-info h2 { margin: 0; font-size: 20px; color: var(--navy); }
.member-info p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.member-info b { color: var(--orange); }
.member-actions { display: flex; gap: 10px; }
.link-list li { padding: 8px 0; border-bottom: 1px dashed #eef2f7; font-size: 14px; }
.link-list li:last-child { border-bottom: 0; }

/* ---------------- 页脚 ---------------- */
.foot { background: var(--navy-deep); color: #9fb4c8; margin-top: 20px; }
.foot-in {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 30px; padding: 36px 0 28px;
}
.foot-col strong { display: block; color: #e6eff8; font-size: 15px; margin-bottom: 10px; }
.foot-col p { margin: 0; font-size: 13px; line-height: 1.9; color: #8ea5bb; }
.foot-col a { color: #8ea5bb; margin-right: 14px; }
.foot-col a:hover { color: #fff; }
.foot-bar { border-top: 1px solid #17324c; padding: 14px 0; text-align: center; font-size: 12px; color: #7f97ae; }
.foot-bar.dim { border-top: 0; padding-top: 0; color: #5d7690; }

/* ---------------- 后台 ---------------- */
.admin-body { background: #f0f3f8; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
    flex: 0 0 210px; background: var(--navy); color: #c8d8e8;
    display: flex; flex-direction: column; padding: 18px 0;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 18px 18px; font-weight: 700; color: #fff; }
.admin-side nav { display: flex; flex-direction: column; }
.admin-side nav a { padding: 10px 20px; color: #b7c9db; font-size: 14px; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-side-foot { margin-top: auto; padding: 14px 20px 0; display: flex; gap: 14px; font-size: 13px; }
.admin-side-foot a { color: #8ea5bb; }
.admin-main { flex: 1 1 auto; padding: 20px 26px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.admin-top strong { font-size: 18px; color: var(--navy); }
.admin-top-user { font-size: 13px; color: var(--blue); text-decoration: none; border-bottom: 1px dashed transparent; }
.admin-top-user:hover { color: var(--orange); border-bottom-color: var(--orange); }
.admin-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.admin-card span { display: block; font-size: 12px; color: var(--muted); }
.admin-card b { display: block; font-size: 26px; color: var(--navy); line-height: 1.3; }
.admin-card i { font-style: normal; font-size: 12px; color: var(--orange); }
.admin-card a { font-size: 12px; }
.admin-block { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.admin-block + .admin-block { margin-top: 16px; }
.admin-block h3 { margin: 0 0 12px; font-size: 16px; color: var(--navy); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #f0f4f9; }
.admin-table th { color: var(--muted); font-weight: 500; background: #fafcfe; }
.admin-table .ok { color: #1a7f4b; }
.admin-table .bad { color: #b3352a; }
.admin-table .warn { color: #ad6b13; }
.admin-ops { display: flex; gap: 6px; }
.admin-search { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.admin-search input { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; outline: none; }
.admin-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.admin-tabs { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.admin-tabs a { padding: 5px 14px; border-radius: 14px; background: #f3f7fc; color: #46586c; font-size: 13px; }
.admin-tabs a.on { background: var(--blue); color: #fff; }
.admin-form { max-width: 820px; }

/* 三方对接区块：分组标题 + 操作提示 */
.admin-block .auth-h { margin: 26px 0 10px; padding-top: 18px; border-top: 1px dashed #e8edf3; font-size: 15px; color: var(--navy); }
.admin-block .auth-h:first-of-type { margin-top: 18px; }
.auth-tip { margin: 0 0 14px; padding: 10px 14px; background: #f7fbf8; border-left: 3px solid #2eb872; color: #5b6b7b; font-size: 12px; line-height: 1.9; }
.auth-tip code { display: inline-block; padding: 1px 6px; margin: 1px 0; background: #fff; border: 1px solid #e2e8ee; border-radius: 3px; color: #2a3a4a; font-size: 12px; word-break: break-all; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1240px) {
    .wrap { width: calc(100% - 32px); }
}

@media (max-width: 1000px) {
    .grid3 { grid-template-columns: 1fr; }
    .quick { grid-template-columns: repeat(2, 1fr); }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .hmain-in { flex-wrap: wrap; gap: 12px; }
    .logo-txt strong { font-size: 22px; }
    .navlist a { padding: 0 12px; font-size: 14px; }
    .tel { display: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .admin-shell { flex-direction: column; }
    .admin-side { flex: none; }
    .admin-cards { grid-template-columns: repeat(2, 1fr); }
    .field-2 { grid-template-columns: 1fr; }
}
