/* 网站统计后台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif; background: #f2f3f7; color: #333; }
a { color: #4a6ee0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 180px; background: #23263a; color: #aab; flex-shrink: 0; }
.sidebar .logo { color: #fff; font-size: 18px; font-weight: bold; padding: 20px; text-align: center; }
.sidebar nav a { display: block; color: #aab; padding: 12px 20px; }
.sidebar nav a:hover { color: #fff; text-decoration: none; background: #2d3049; }
.sidebar nav a.on { color: #fff; background: #e0543a; }
.main { flex: 1; padding: 24px; overflow-x: auto; }
.page-title { font-size: 20px; margin-bottom: 18px; }

/* 表格 */
.tbl { width: 100%; background: #fff; border-collapse: collapse; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; white-space: nowrap; }
.tbl th { background: #f8f9fc; color: #666; font-weight: normal; }
.tbl td.wrap { white-space: normal; word-break: break-all; max-width: 320px; }
.tbl tr:hover td { background: #fafbff; }

/* 标签页 */
.tabs { margin-bottom: 16px; border-bottom: 2px solid #e3e5ee; }
.tabs a { display: inline-block; padding: 8px 18px; color: #555; margin-bottom: -2px; }
.tabs a.on { color: #e0543a; border-bottom: 2px solid #e0543a; }
.site-switch { margin-bottom: 14px; color: #888; }
.site-switch a { display: inline-block; padding: 4px 12px; margin-right: 6px; background: #fff; border-radius: 4px; }
.site-switch a.on { background: #4a6ee0; color: #fff; text-decoration: none; }

/* 卡片与表单 */
.card { background: #fff; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.card h3 small { color: #999; font-weight: normal; }
.form-inline input { padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; margin-right: 8px; width: 220px; }
button { padding: 8px 18px; border: 0; border-radius: 4px; background: #4a6ee0; color: #fff; cursor: pointer; }
button.danger { background: #d9534f; padding: 4px 12px; }
.code { background: #f6f8fa; border: 1px solid #e3e5ee; padding: 10px; border-radius: 4px; overflow-x: auto; user-select: all; }
.ops { margin-top: 10px; }
.ops a { margin-right: 12px; }

/* 提示 */
.notice { background: #e8f6ec; color: #2a7a3a; padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.empty { color: #999; padding: 30px 0; }
.error { color: #d9534f; margin-bottom: 10px; }

/* 占比条 */
.bar { display: inline-block; width: 120px; height: 8px; background: #eef0f6; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.bar span { display: block; height: 8px; background: #4a6ee0; border-radius: 4px; }

/* 分页 */
.pager a { display: inline-block; padding: 4px 10px; margin-right: 4px; background: #fff; border-radius: 4px; }
.pager a.on { background: #4a6ee0; color: #fff; text-decoration: none; }

/* 部署提示词 */
.prompt-box { width: 100%; font: 12px/1.6 Consolas, monospace; padding: 12px; border: 1px solid #ddd; border-radius: 4px; background: #fafbfd; white-space: pre; }
.copy-tip { color: #2a7a3a; margin-left: 8px; }

/* AI 爬虫验证状态 */
.v-ok { color: #2a7a3a; }
.v-fake { color: #d9534f; }
.v-none { color: #999; }
.verify-note { color: #999; font-size: 12px; margin-top: 8px; }

/* 统计数字中的爬虫数（括号部分） */
.bot-n { color: #999; font-size: 12px; margin-left: 2px; }

/* 可折叠站点卡片 */
details.card { padding: 0; }
details.card summary { cursor: pointer; list-style: none; padding: 14px 20px; font-size: 15px; user-select: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::before { content: '▸'; color: #999; margin-right: 8px; }
details.card[open] summary::before { content: '▾'; }
details.card summary small { color: #999; font-weight: normal; margin-left: 6px; }
details.card summary:hover { background: #fafbff; }
details.card .site-body { padding: 0 20px 16px; border-top: 1px solid #f0f0f0; padding-top: 12px; }

/* 登录页 */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 36px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.1); width: 340px; }
.login-box h2 { margin-bottom: 20px; text-align: center; }
.login-box input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 14px; }
.login-box button { width: 100%; }
