﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6fa; color: #333; font-size: 14px; }

/* ---- 登录 ---- */
.login-wrap { position: fixed; inset: 0; background: linear-gradient(135deg, #00b578 0%, #009a63 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-box { background: #fff; padding: 40px 40px 28px; border-radius: 16px; width: 380px; box-shadow: 0 24px 70px rgba(0,0,0,.25); position: relative; z-index: 2; }
.login-title { font-size: 22px; font-weight: 700; color: #00b578; text-align: center; margin-top: 12px; }
.login-sub { font-size: 12px; color: #999; text-align: center; margin: 6px 0 24px; letter-spacing: 2px; }
.login-msg { color: #e54d42; text-align: center; margin-top: 10px; min-height: 18px; font-size: 13px; }
/* 美化：Logo 圆标 */
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: linear-gradient(135deg, #00c68a, #00a06b); color: #fff; font-size: 32px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(0,178,116,.4); }
/* 输入框组 */
.login-field { position: relative; margin-bottom: 16px; }
.login-field .ipt { padding-left: 40px; height: 44px; border-radius: 8px; border: 1px solid #e2e8e4; width: 100%; box-sizing: border-box; transition: border-color .2s, box-shadow .2s; }
.login-field .ipt:focus { border-color: #00b578; box-shadow: 0 0 0 3px rgba(0,181,120,.12); outline: none; }
.login-icon { position: absolute; left: 13px; top: 11px; font-size: 16px; z-index: 1; }
.captcha-field .ipt { padding-right: 108px; }
.captcha-img { position: absolute; right: 6px; top: 5px; height: 34px; width: 96px; border-radius: 6px; cursor: pointer; border: 1px solid #e2e8e4; }
/* 登录按钮 */
.login-btn { width: 100%; height: 44px; font-size: 16px; letter-spacing: 6px; border: none; border-radius: 8px; background: linear-gradient(135deg, #00c68a, #00a06b); color: #fff; cursor: pointer; transition: transform .15s, box-shadow .2s; box-shadow: 0 6px 16px rgba(0,178,116,.3); }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,178,116,.4); }
.login-btn:active { transform: translateY(0); }
/* 底部标语 */
.login-foot { text-align: center; color: #bbb; font-size: 12px; margin-top: 8px; letter-spacing: 1px; }
/* 背景装饰气泡 */
.login-bubble { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); z-index: 1; }
.b1 { width: 320px; height: 320px; top: -80px; left: -60px; }
.b2 { width: 220px; height: 220px; bottom: -60px; right: -40px; }
.b3 { width: 120px; height: 120px; top: 24%; right: 14%; background: rgba(255,255,255,.06); }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #0b2239; color: #fff; position: fixed; top: 0; bottom: 0; display: flex; flex-direction: column; }
.side-logo { padding: 22px 18px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.08); color: #4ade80; }
#nav { flex: 1; overflow-y: auto; padding: 8px 0; }
#nav a { display: block; padding: 12px 20px; color: #b7c3cf; cursor: pointer; text-decoration: none; font-size: 14px; }
#nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
#nav a.active { color: #fff; background: #00b578; }
.side-user { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-user span { color: #fff; margin-right: 12px; }
.side-user a { color: #4ade80; cursor: pointer; margin-right: 10px; }
.content { flex: 1; margin-left: 210px; padding: 24px; }

/* ---- 面板 ---- */
.panel { display: none; }
.panel.active { display: block; }
.panel h2 { font-size: 18px; margin-bottom: 16px; color: #1a2b3c; }
.toolbar { margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tip { background: #eefaf4; color: #009a63; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }

/* ---- 控件 ---- */
.ipt { height: 34px; padding: 0 10px; border: 1px solid #d9dde3; border-radius: 6px; outline: none; font-size: 14px; min-width: 120px; }
.ipt:focus { border-color: #00b578; }
.w80 { width: 90px; }
.btn { height: 34px; padding: 0 14px; border: 1px solid #d9dde3; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: #00b578; color: #00b578; }
.btn-primary { background: #00b578; border-color: #00b578; color: #fff; }
.btn-primary:hover { background: #009a63; color: #fff; }
.btn-danger { background: #e54d42; border-color: #e54d42; color: #fff; }
.btn-danger:hover { background: #c0392b; color: #fff; }
.btn-block { width: 100%; margin-top: 14px; }

/* ---- 表格 ---- */
.table-wrap { background: #fff; border-radius: 8px; overflow: auto; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.table { width: 100%; border-collapse: collapse; }
.table th { background: #f7f8fa; padding: 10px 12px; text-align: left; font-weight: 600; color: #555; white-space: nowrap; border-bottom: 1px solid #eee; }
.table td { padding: 10px 12px; border-bottom: 1px solid #f2f3f5; vertical-align: middle; }
.table tr:hover td { background: #fafbfc; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-green { background: #e8f7ee; color: #009a63; }
.badge-red { background: #fdeaea; color: #e54d42; }
.badge-orange { background: #fff4e5; color: #f08a24; }
.badge-gray { background: #f0f1f3; color: #888; }
.badge-blue { background: #e8f1fd; color: #2b7de9; }
.page-bar { margin-top: 14px; display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.page-bar span { color: #888; }

/* ---- 统计卡片 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-card .num { font-size: 26px; font-weight: 700; color: #00b578; margin-top: 6px; }
.stat-card .label { color: #888; font-size: 13px; }
.stat-card.hot .num { color: #e54d42; }

/* ---- 弹窗 ---- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 999; }
.mask.show { display: flex; }
.dialog { background: #fff; border-radius: 10px; width: 460px; max-width: 92vw; max-height: 86vh; overflow-y: auto; padding: 24px; }
.dialog h3 { margin-bottom: 16px; font-size: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; margin-bottom: 5px; color: #666; font-size: 13px; }
.form-row .ipt, .form-row textarea { width: 100%; }
textarea.ipt { height: 90px; padding: 8px 10px; resize: vertical; font-family: inherit; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---- 配置表单 ---- */
.config-form { background: #fff; border-radius: 8px; padding: 18px; max-width: 560px; margin-bottom: 14px; }
.config-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f2f3f5; gap: 12px; }
.config-item .desc { color: #999; font-size: 12px; margin-top: 2px; }
.config-item input { width: 150px; }

.config-form textarea { min-height: 100px; }
.config-form .form-row textarea { height: 90px; }

/* 表格内小按钮 */
.tbl-btn { padding: 3px 10px; font-size: 12px; border-radius: 4px; border: 1px solid #d9dde3; background: #fff; cursor: pointer; margin-right: 4px; }
.tbl-btn:hover { border-color: #00b578; color: #00b578; }
.tbl-btn.danger:hover { border-color: #e54d42; color: #e54d42; }
.img-thumb { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; }

/* 广告管理页内表单 */
.ad-form-wrap { background: #fff; border-radius: 8px; padding: 16px 20px 20px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1px solid #e6ede9; }
.ad-form-title { font-weight: 700; color: #26342e; margin-bottom: 14px; font-size: 15px; }
.ad-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.ad-form-grid .form-item label { display: block; font-size: 13px; color: #667; margin-bottom: 6px; }
.ad-form-grid .ipt { width: 100%; box-sizing: border-box; height: 38px; border-radius: 6px; border: 1px solid #dfe6e2; padding: 0 10px; }
.ad-form-grid .ipt:focus { border-color: #00b578; outline: none; }
.ad-form-grid .form-item:nth-child(3), .ad-form-grid .form-item:nth-child(4) { grid-column: 1 / -1; }
.ad-upload-row { display: flex; align-items: center; gap: 10px; }
.ad-upload-row .ipt { width: auto; flex: 1; padding: 6px 10px; }
.ad-upload-tip { font-size: 12px; color: #999; white-space: nowrap; }
.ad-img-preview { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.ad-img-preview img { height: 64px; border-radius: 6px; border: 1px solid #e2e8e4; }
.ad-img-url { font-size: 12px; color: #88939a; word-break: break-all; }
.ad-form-btns { margin-top: 16px; display: flex; gap: 10px; }
.btn-default { background: #fff; color: #556; border: 1px solid #dfe6e2; }

.tbl-link { color: #00b578; margin-right: 6rpx; text-decoration: none; font-weight: 600; }
