/* OneTool Lite - 样式（浅色主题） */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航 */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 16px;
  height: 56px; display: flex; align-items: center; gap: 20px;
}
.brand { font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 8px; font-size: 14px;
}
.nav a:hover { background: #f9fafb; color: var(--text); text-decoration: none; }
.nav a.active { color: var(--primary); background: #eff6ff; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }

.container { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
.page-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.card-title { font-weight: 700; font-size: 15px; margin: 0 0 12px; }

/* 网格 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* 统计块 */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .num { font-size: 24px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 表单 */
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
textarea { min-height: 90px; resize: vertical; }
.field-tips { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; font-family: inherit; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f9fafb; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* 徽章 */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: #f3f4f6; color: var(--muted); }
.badge-primary { background: #dbeafe; color: #1e40af; }

/* 提示 */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* 平台入口 */
.platform-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; text-align: center; color: var(--text);
  transition: .15s;
}
.platform-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.platform-icon { font-size: 26px; margin-bottom: 8px; }
.platform-name { font-weight: 600; font-size: 14px; }
.platform-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 套餐 */
.plan {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; cursor: pointer; display: block; color: var(--text);
}
.plan:hover { text-decoration: none; }
.plan.selected { border-color: var(--primary); }
.plan .price { font-size: 26px; font-weight: 700; color: var(--primary); }
.plan .name { font-weight: 600; margin-bottom: 6px; }

/* 登录页 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 36px; width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 22px; margin: 0 0 4px; text-align: center; }
.auth-card .sub { color: var(--muted); font-size: 13px; text-align: center; margin: 0 0 24px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }

/* 公告 */
.notice-item { padding: 12px 16px; border-left: 3px solid var(--primary); background: #f9fafb; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.notice-item .t { font-weight: 600; font-size: 13px; }
.notice-item .c { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: pre-wrap; }

/* 杂项 */
.muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fs-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; z-index: 100; opacity: 0; transition: opacity .2s; pointer-events: none;
  max-width: 80vw;
}
.toast.show { opacity: 1; }

/* 行内表单 / 链接式按钮 */
.inline-form { display: inline; margin: 0; }
.as-link {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--primary); cursor: pointer; font-family: inherit; font-size: inherit;
  text-decoration: none;
}
.as-link:hover { text-decoration: underline; }
.check-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; cursor: pointer; }
.check-label input[type=checkbox] { width: auto; }
button:disabled { opacity: .6; cursor: not-allowed; }
