/* ===== 全局 ===== */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:"Microsoft YaHei","Helvetica Neue",Arial,sans-serif;color:#333;background:#f5f7fa;line-height:1.6}
a{text-decoration:none;color:#2563eb}
img{max-width:100%;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 16px}
.btn{display:inline-block;padding:8px 18px;border-radius:6px;border:none;cursor:pointer;font-size:14px;background:#2563eb;color:#fff;transition:.2s}
.btn:hover{background:#1d4ed8}
.btn-gray{background:#9ca3af}
.btn-gray:hover{background:#6b7280}
.btn-danger{background:#ef4444}
.btn-danger:hover{background:#dc2626}
.btn-sm{padding:5px 10px;font-size:12px}
.tag{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;background:#e5e7eb;color:#374151}
.tag-blue{background:#dbeafe;color:#1e40af}
.tag-green{background:#dcfce7;color:#166534}
.tag-red{background:#fee2e2;color:#991b1b}
.tag-gray{background:#f3f4f6;color:#6b7280}
.empty{text-align:center;padding:40px;color:#9ca3af}
.form-group{margin-bottom:14px}
.form-group label{display:block;margin-bottom:6px;font-weight:600;font-size:14px}
.form-group .req{color:#ef4444}
input,select,textarea{width:100%;padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;font-family:inherit}
textarea{min-height:120px;resize:vertical}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:10px 12px;text-align:left;border-bottom:1px solid #e5e7eb;font-size:14px}
th{background:#f9fafb;font-weight:600}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:20px;flex-wrap:wrap}
.pagination a,.pagination span{padding:6px 12px;border:1px solid #d1d5db;border-radius:4px;background:#fff;font-size:14px}
.pagination .active{background:#2563eb;color:#fff;border-color:#2563eb}
.search-bar{display:flex;gap:8px;margin-bottom:16px;align-items:center;flex-wrap:wrap}
.search-bar input{width:240px}
.msg{padding:10px 14px;background:#dcfce7;color:#166534;border-radius:6px;margin-bottom:14px;border:1px solid #86efac}

/* ===== 前台头部 ===== */
.site-header{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06);position:sticky;top:0;z-index:100}
.site-header .inner{display:flex;align-items:center;justify-content:space-between;height:64px;max-width:1200px;margin:0 auto;padding:0 16px}
.site-header .logo{font-size:22px;font-weight:700;color:#16a34a}
.site-header .logo span{color:#0ea5e9}
.site-header nav a{margin-left:22px;font-size:15px;color:#374151;font-weight:500}
.site-header nav a:hover,.site-header nav a.active{color:#16a34a}
.site-footer{background:#1f2937;color:#9ca3af;text-align:center;padding:24px 16px;margin-top:40px}
.site-footer a{color:#9ca3af}

/* 轮播 */
.carousel{position:relative;height:340px;overflow:hidden;border-radius:0 0 12px 12px}
.carousel-track{display:flex;height:100%;transition:transform .6s ease}
.carousel-track .slide{min-width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#16a34a,#0ea5e9);color:#fff;font-size:28px;font-weight:700}
.carousel-track .slide img{width:100%;height:100%;object-fit:cover}
.carousel .arrow{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.4);color:#fff;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:22px;border:none}
.carousel .arrow.prev{left:12px}
.carousel .arrow.next{right:12px}
.carousel .dots{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:8px}
.carousel .dots span{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.5);cursor:pointer}
.carousel .dots span.active{background:#fff}

/* 快捷入口 */
.quick-entry{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0}
.quick-entry a{background:#fff;border-radius:10px;padding:24px 16px;text-align:center;box-shadow:0 2px 6px rgba(0,0,0,.05);transition:.2s}
.quick-entry a:hover{transform:translateY(-3px);box-shadow:0 6px 14px rgba(0,0,0,.1)}
.quick-entry .icon{width:48px;height:48px;border-radius:50%;margin:0 auto 10px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#fff}
.quick-entry .ic1{background:#f59e0b}
.quick-entry .ic2{background:#10b981}
.quick-entry .ic3{background:#8b5cf6}
.quick-entry .ic4{background:#ef4444}
.quick-entry p{font-size:14px;color:#374151;font-weight:600}

/* 投票提醒 */
.vote-remind{background:linear-gradient(90deg,#fef3c7,#fde68a);border:1px solid #f59e0b;border-radius:10px;padding:14px 20px;display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.vote-remind .txt{font-size:15px;color:#92400e;font-weight:600}

/* 卡片网格 */
.section-title{font-size:20px;font-weight:700;margin:28px 0 16px;border-left:4px solid #16a34a;padding-left:10px}
.row-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.list-card{background:#fff;border-radius:10px;padding:16px 20px;box-shadow:0 2px 6px rgba(0,0,0,.05);margin-bottom:12px;transition:.2s}
.list-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.08)}
.list-card .title{font-size:16px;font-weight:600;margin-bottom:6px}
.list-card .title a{color:#111}
.list-card .meta{font-size:13px;color:#6b7280;margin-top:6px}
.list-card .summary{font-size:14px;color:#4b5563;margin-top:6px}

/* 新闻图文 */
.news-list{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.news-item{display:flex;gap:14px;background:#fff;border-radius:10px;padding:14px;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.news-item .cover{width:140px;height:100px;border-radius:8px;background:#e5e7eb;flex-shrink:0;object-fit:cover}
.news-item .cover.placeholder{display:flex;align-items:center;justify-content:center;color:#9ca3af}
.news-item h3{font-size:16px;margin-bottom:6px}
.news-item h3 a{color:#111}
.news-item .meta{font-size:13px;color:#6b7280}
.news-item .sum{font-size:14px;color:#4b5563;margin-top:6px}

/* 活动卡片 */
.act-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.act-card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,.05);transition:.2s}
.act-card:hover{transform:translateY(-3px)}
.act-card .cover{height:160px;background:linear-gradient(135deg,#8b5cf6,#ec4899);display:flex;align-items:center;justify-content:center;color:#fff;font-size:40px}
.act-card .cover img{width:100%;height:100%;object-fit:cover}
.act-card .body{padding:14px}
.act-card h3{font-size:16px;margin-bottom:6px}
.act-card .meta{font-size:13px;color:#6b7280}

/* 详情页 */
.detail{background:#fff;border-radius:10px;padding:30px;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.detail h1{font-size:26px;margin-bottom:10px}
.detail .meta{color:#6b7280;font-size:14px;border-bottom:1px solid #e5e7eb;padding-bottom:14px;margin-bottom:18px}
.detail .content{font-size:15px;line-height:1.8}
.detail .content img{margin:12px 0;border-radius:8px}
.detail .gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}

/* 投票条形图 */
.vote-opt{background:#fff;border-radius:8px;padding:14px;margin-bottom:12px;border:1px solid #e5e7eb}
.vote-opt .opt-label{display:flex;justify-content:space-between;font-size:14px;margin-bottom:6px}
.vote-bar{height:18px;background:#e5e7eb;border-radius:9px;overflow:hidden}
.vote-bar .fill{height:100%;background:linear-gradient(90deg,#16a34a,#4ade80);transition:width .6s}

/* ===== 后台 ===== */
.admin-layout{display:flex;min-height:100vh}
.admin-sidebar{width:220px;background:#1f2937;color:#9ca3af;flex-shrink:0}
.admin-sidebar .brand{padding:18px 20px;font-size:18px;font-weight:700;color:#fff;border-bottom:1px solid #374151}
.admin-sidebar a{display:block;padding:12px 20px;color:#9ca3af;font-size:14px;border-left:3px solid transparent}
.admin-sidebar a:hover,.admin-sidebar a.active{background:#111827;color:#fff;border-left-color:#16a34a}
.admin-main{flex:1;display:flex;flex-direction:column;background:#f5f7fa}
.admin-topbar{height:56px;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 20px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
.admin-topbar .user{font-size:14px;color:#374151}
.admin-content{padding:24px;flex:1}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:24px}
.stat-card{background:#fff;border-radius:10px;padding:20px;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.stat-card .num{font-size:32px;font-weight:700;color:#16a34a}
.stat-card .label{font-size:14px;color:#6b7280;margin-top:4px}
.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-wrap:wrap;gap:8px}
.login-wrap{max-width:380px;margin:80px auto;background:#fff;border-radius:10px;padding:30px;box-shadow:0 6px 20px rgba(0,0,0,.1)}
.login-wrap h2{text-align:center;margin-bottom:20px;color:#16a34a}
.captcha-row{display:flex;gap:8px;align-items:center}
.captcha-row input{flex:1}
.captcha-row img{height:40px;border:1px solid #d1d5db;border-radius:6px;cursor:pointer}
.opt-row{display:flex;gap:8px;margin-bottom:8px;align-items:center}
.opt-row input{flex:1}
.opt-row .del{color:#ef4444;cursor:pointer;background:none;border:none;font-size:18px}
@media(max-width:768px){
  .quick-entry{grid-template-columns:repeat(2,1fr)}
  .row-2,.news-list{grid-template-columns:1fr}
  .act-grid{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .admin-sidebar{position:fixed;left:-220px;transition:.3s;z-index:200}
  .admin-sidebar.show{left:0}
}
