/* ===== SignIn 自动签到助手 全局样式 ===== */
:root {
  --primary: #4f6ef7;
  --primary-dark: #3d5ae0;
  --primary-light: #eef1fe;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --bg: #f5f6fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
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; }

/* ===== 顶部导航 ===== */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { font-size: 18px; font-weight: 700; color: var(--primary); }
.brand span { color: var(--text); font-weight: 600; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 10px; }

/* ===== 布局 ===== */
.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 12px; }

/* 统计卡 */
.stat-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-card {
  flex: 1 1 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  min-width: 0;
}
.stat-card .label { font-size: 13px; color: var(--text-secondary); }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--primary); }
.stat-card .value.alt { color: var(--success); }
.stat-card .value.warn { color: var(--warning); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th, table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data th { background: #fafbfc; color: var(--text-secondary); font-weight: 600; }
table.data tr:hover td { background: #fafbfc; }

/* ===== 徽标 ===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  transition: all .15s;
}
.btn:hover { text-decoration: none; opacity: .9; }
.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-outline { border-color: var(--border); color: var(--text-secondary); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 表单 ===== */
.form-stack fieldset { border: none; margin-bottom: 16px; }
.form-stack legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.form-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.form-item { flex: 1 1 200px; min-width: 0; }
.form-item label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-item input, .form-item select, .form-item 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);
  outline: none;
  transition: border-color .15s;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,.12);
}
.form-item textarea { min-height: 90px; resize: vertical; }

/* ===== 登录/注册页 ===== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef1fe 0%, #f5f6fa 60%, #e6f4ff 100%);
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 800;
}
.auth-header h1 { font-size: 20px; font-weight: 700; }
.auth-header p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-secondary); }

/* ===== 首页 hero ===== */
.hero {
  text-align: center;
  padding: 64px 20px 48px;
  background: linear-gradient(160deg, #eef1fe 0%, #f5f6fa 100%);
  border-radius: 16px;
  margin-bottom: 24px;
}
.hero h1 { font-size: 32px; font-weight: 800; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-secondary); font-size: 15px; margin-top: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero .actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 平台卡 */
.platform-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.platform-card {
  flex: 1 1 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
  transition: transform .15s;
}
.platform-card:hover { transform: translateY(-2px); }
.platform-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.platform-card h4 { font-size: 15px; }
.platform-card p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }

/* ===== 任务开关 ===== */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: .2s;
}
.slider:before {
  content: "";
  position: absolute; height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* ===== 提示 ===== */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.alert-info { background: var(--primary-light); color: var(--primary-dark); }
.alert-warn { background: #fef3c7; color: #92400e; }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 工具 ===== */
.muted { color: var(--text-secondary); font-size: 13px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }
.text-right { text-align: right; }
code { background: #f3f4f6; padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }

/* ===== OneTool 风格侧边栏布局（控制台） ===== */
.app-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0;
  background: #1e2433; color: #cbd2e0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand { color: #fff; font-size: 19px; }
.sidebar-brand .brand span { color: #8ca3ff; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-user .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg,#4f6ef7,#8ca3ff);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user .uinfo { flex: 1; min-width: 0; }
.sidebar-user .uname { color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .uid { font-size: 11px; color: #8b95a9; }
.sidebar-user .quota { text-align: right; font-size: 11px; color: #8b95a9; line-height: 1.3; }
.sidebar-user .quota b { color: #ffd166; font-size: 15px; }
.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-group { font-size: 11px; color: #6b7689; text-transform: uppercase; letter-spacing: .5px; padding: 14px 20px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: #cbd2e0; font-size: 13.5px; font-weight: 500;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(79,110,247,.18); color: #fff; border-left-color: #4f6ef7; }
.nav-icon { width: 18px; text-align: center; opacity: .85; font-size: 14px; }
.nav-tag {
  margin-left: auto; background: rgba(255,255,255,.12); color: #cbd2e0;
  font-size: 11px; padding: 0 8px; border-radius: 10px;
}
.nav-sub { margin-bottom: 2px; }
.nav-sub-links { display: flex; flex-direction: column; padding: 2px 0 6px 51px; gap: 2px; }
.nav-sub-links a { font-size: 12.5px; color: #8b95a9; padding: 3px 0; }
.nav-sub-links a:hover { color: #fff; text-decoration: none; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .btn { width: 100%; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar .page-title { font-size: 16px; font-weight: 700; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { font-weight: 600; color: var(--text); font-size: 13.5px; }

/* 仪表盘欢迎横幅 */
.welcome-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(120deg,#3d5ae0,#6d7ff2);
  color: #fff; border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 20px;
}
.wb-icon { font-size: 30px; opacity: .9; }
.wb-title { font-size: 17px; font-weight: 700; }
.wb-sub { font-size: 12.5px; opacity: .85; margin-top: 2px; }

/* 统计卡片点击化 */
.stat-card.link-pop { transition: transform .12s ease, box-shadow .12s ease; display: block; color: inherit; }
.stat-card.link-pop:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }

/* 卡片头部 */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h3 { font-size: 15px; }

/* 双栏：主内容 + 用户卡 */
.row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.col-main { flex: 1 1 480px; min-width: 0; }
.col-side { flex: 1 1 260px; max-width: 320px; min-width: 0; }

/* 用户信息卡（参考 OneTool 用户中心） */
.user-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.user-card-top {
  text-align: center; padding: 26px 16px 20px;
  background: linear-gradient(120deg,#3d5ae0,#6d7ff2); color: #fff;
}
.avatar-lg {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.6);
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.uc-name { font-size: 16px; font-weight: 700; }
.uc-uid { font-size: 12px; opacity: .85; }
.user-card-body { padding: 14px 18px; }
.uc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.uc-row:last-child { border-bottom: none; }
.uc-row span { color: var(--text-secondary); }
.text-green { color: var(--success); }
.user-card-foot { padding: 0 18px 18px; }

/* 账号卡片网格（OneTool 风格） */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.acc-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.acc-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--primary-light); }
.acc-type { font-weight: 700; font-size: 14px; color: var(--primary-dark); }
.acc-user { font-size: 15px; font-weight: 600; padding: 14px 16px 4px; word-break: break-all; }
.acc-meta { display: flex; justify-content: space-between; padding: 6px 16px 14px; font-size: 12.5px; color: var(--text-secondary); }
.acc-card-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); margin-top: auto; }
.acc-card-foot .btn { flex: 1; text-align: center; }

/* 移动端 */
@media (max-width: 860px) {
  .app-body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar-brand, .sidebar-user { border-bottom: none; }
  .sidebar-nav { display: none; }
  .sidebar-foot { display: none; }
  .col-side { max-width: none; }
  .acc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
