/* 短网址系统 统一样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #303133;
  line-height: 1.6;
}
a { color: #409eff; text-decoration: none; }
a:hover { color: #337ecc; }

/* 顶部导航 */
.nav {
  background: #fff;
  border-bottom: 1px solid #ebeef5;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav .logo { font-size: 18px; font-weight: 700; color: #409eff; }
.nav .menu { margin-left: 32px; display: flex; gap: 24px; }
.nav .menu a { color: #606266; font-size: 15px; }
.nav .menu a:hover, .nav .menu a.active { color: #409eff; }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; color: #606266; }
.nav .right .avatar { width: 30px; height: 30px; border-radius: 50%; background: #409eff; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* 容器 */
.container { max-width: 1080px; margin: 0 auto; padding: 24px 16px; }
.container-narrow { max-width: 460px; margin: 40px auto; padding: 0 16px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 1px 6px rgba(0,0,0,.05); margin-bottom: 20px; }
.card h2 { font-size: 18px; margin-bottom: 20px; }
.card h3 { font-size: 16px; margin: 20px 0 12px; }

/* 首页Hero */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 32px; margin-bottom: 12px; color: #1f2d3d; }
.hero p { color: #909399; font-size: 15px; margin-bottom: 32px; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: #606266; margin-bottom: 6px; }
.form-group .hint { font-size: 12px; color: #909399; margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=url], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: #409eff; }
input:disabled, input[readonly] { background: #f5f7fa; color: #909399; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  background: #409eff;
  color: #fff;
  transition: background .2s;
  text-align: center;
}
.btn:hover { background: #337ecc; color: #fff; }
.btn-block { display: block; width: 100%; padding: 12px; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-success { background: #67c23a; }
.btn-success:hover { background: #529b2e; }
.btn-danger { background: #f56c6c; }
.btn-danger:hover { background: #c45656; }
.btn-warning { background: #e6a23c; }
.btn-warning:hover { background: #b88230; }
.btn-default { background: #fff; color: #606266; border: 1px solid #dcdfe6; }
.btn-default:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn:disabled { background: #c0c4cc; cursor: not-allowed; }

/* 短网址生成结果 */
.result-box { margin-top: 20px; padding: 16px; background: #f0f9eb; border: 1px solid #e1f3d8; border-radius: 8px; display: none; }
.result-box.show { display: block; }
.result-box .short-url { font-size: 18px; color: #67c23a; font-weight: 600; word-break: break-all; }
.result-box .row { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 提示消息 */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }
.alert-success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.alert-info { background: #edf2fc; color: #409eff; border: 1px solid #d4e3fc; }
.alert-warning { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #ebeef5; }
th { background: #fafafa; color: #909399; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f5f7fa; }
td .url-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
td .code-cell { font-family: monospace; font-weight: 600; color: #409eff; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-success { background: #f0f9eb; color: #67c23a; }
.badge-danger { background: #fef0f0; color: #f56c6c; }
.badge-info { background: #ecf5ff; color: #409eff; }
.badge-warning { background: #fdf6ec; color: #e6a23c; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.stat-card .num { font-size: 28px; font-weight: 700; color: #409eff; }
.stat-card .label { font-size: 13px; color: #909399; margin-top: 4px; }
.stat-card.green .num { color: #67c23a; }
.stat-card.orange .num { color: #e6a23c; }
.stat-card.red .num { color: #f56c6c; }
.stat-card.purple .num { color: #8e6be8; }
.stat-card.cyan .num { color: #13c2c2; }

/* 进度条（配额） */
.quota-bar { height: 8px; background: #ebeef5; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.quota-bar > div { height: 100%; background: #409eff; border-radius: 4px; }

/* 分页 */
.pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; }
.pagination .current { background: #409eff; color: #fff; border-color: #409eff; }

/* 后台布局 */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar { width: 200px; background: #304156; flex-shrink: 0; }
.sidebar a { display: block; padding: 14px 24px; color: #bfcbd9; font-size: 14px; border-left: 3px solid transparent; }
.sidebar a:hover { background: #263445; color: #fff; }
.sidebar a.active { background: #1f2d3d; color: #409eff; border-left-color: #409eff; }
.sidebar .nav-group-title { padding: 16px 24px 6px; font-size: 12px; color: #6b7a8d; letter-spacing: 1px; cursor: default; }
.sidebar .nav-group-title:first-child { padding-top: 10px; }
.main { flex: 1; padding: 24px; min-width: 0; }

/* 图表条形 */
.bar-row { display: flex; align-items: center; margin-bottom: 10px; font-size: 13px; }
.bar-row .name { width: 110px; color: #606266; flex-shrink: 0; }
.bar-row .bar { flex: 1; height: 18px; background: #f0f2f5; border-radius: 3px; overflow: hidden; margin: 0 10px; }
.bar-row .bar > div { height: 100%; background: linear-gradient(90deg,#409eff,#66b1ff); }
.bar-row .count { width: 50px; text-align: right; color: #909399; }

.copy-btn { cursor: pointer; color: #409eff; font-size: 13px; }
.muted { color: #909399; font-size: 13px; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* 首页主标签（原始长网址）增大加深 */
.main-label { display: block; font-size: 16px; font-weight: 700; color: #1f2d3d; margin-bottom: 10px; }

/* 首页“更多设置”折叠面板 */
.adv { border: 1px solid #ebeef5; border-radius: 8px; background: #fafbfc; margin: 4px 0 28px; overflow: hidden; }
.adv > summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; outline: none; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary:hover { background: #f4f7fb; }
.adv-title { flex: 1; font-size: 13px; color: #b1b3b8; font-weight: 400; white-space: nowrap; }
.adv > summary:hover .adv-title { color: #909399; }
.adv-arrow { width: 7px; height: 7px; flex: none; border-right: 2px solid #c0c4cc; border-bottom: 2px solid #c0c4cc; transform: rotate(45deg); transition: transform .2s ease; }
.adv[open] .adv-arrow { transform: rotate(225deg); }
.adv[open] > summary { border-bottom: 1px solid #ebeef5; }
.adv-body { padding: 16px 14px 2px; }
.adv-body .form-group:last-child { margin-bottom: 8px; }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .nav .menu { gap: 14px; margin-left: 16px; }
  .hero h1 { font-size: 24px; }
}
