/* =========================================================
   运营平台 UI · 统一大尺寸版
   替换原 assets/style.css 全部内容
   ========================================================= */
* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --bg: #080d18;
  --panel: #111b2d;
  --panel-2: #151f33;
  --line: #26354d;
  --text: #e5efff;
  --muted: #8797b2;
  --cyan: #16c8e8;
  --blue: #55b7ff;
  --green: #27d6a0;
  --danger: #ff718d;
}

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(0,160,170,.10), transparent 36%),
    radial-gradient(ellipse at 90% 100%, rgba(80,65,160,.09), transparent 40%),
    linear-gradient(rgba(40,64,86,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,64,86,.11) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  color: var(--text);
  font: 16px/1.6 Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* 左侧导航 */
.sidebar {
  width: 280px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  background: rgba(9,17,31,.98);
  border-right: 1px solid #1b2a40;
  padding: 28px 14px 18px;
  z-index: 20;
  overflow-y: auto;
}

.brand {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 6px 14px 30px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar nav a {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  color: #91a1bb;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(0,192,220,.10);
  border-color: rgba(0,197,224,.34);
  color: #4ce3f5;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-form {
  margin-top: auto;
  padding-top: 24px;
}

.logout-form button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.logout-form button:hover {
  color: var(--danger);
  border-color: #6b3044;
}

/* 主内容区 */
.main {
  min-width: 0;
  min-height: 100vh;
  margin-left: 280px;
  padding: 30px 36px 64px;
}

.topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar strong { font-size: 21px; font-weight: 750; }

.user-chip {
  border: 1px solid #164a68;
  color: #41bfff;
  background: #0a1b2c;
  border-radius: 22px;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
}

.hero-title {
  text-align: center;
  color: var(--blue);
  font-size: clamp(30px, 2.2vw, 42px);
  letter-spacing: 1.5px;
  margin: 22px 0 30px;
  font-weight: 850;
}

/* 仪表盘卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  min-width: 0;
  min-height: 172px;
  padding: 23px 24px;
  background: linear-gradient(145deg, rgba(20,31,52,.98), rgba(17,28,48,.98));
  border: 1px solid #25344d;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transition: border-color .18s ease, transform .18s ease;
}

.stat-card:hover {
  border-color: rgba(22,200,232,.42);
  transform: translateY(-2px);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #91a2be;
  font-size: 15px;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  color: var(--cyan);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cyan { color: var(--cyan) !important; }

.stat-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: clamp(21px, 1.45vw, 28px);
  font-weight: 800;
  margin: 12px 0 8px;
  letter-spacing: .2px;
  overflow-wrap: anywhere;
}

.stat-sub {
  color: #8494b0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(39,214,160,.75);
  margin-right: 7px;
  vertical-align: middle;
}

.green { color: var(--green); }

.progress {
  height: 8px;
  background: #26344b;
  border-radius: 9px;
  margin: 12px 0 7px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #898bff, #20cbe5);
  border-radius: inherit;
}

/* 工具栏、表单与按钮 */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  min-height: 44px;
}

.toolbar > span {
  margin-left: auto;
  color: #91a2be;
  font-size: 14px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-actions form { margin: 0; }

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid #2b3b54;
  border-radius: 8px;
  background: #101a2b;
  color: #d5e4f9;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover,
button:hover {
  border-color: #147e9b;
  color: #55e1f3;
}

.btn.primary {
  background: #0d2738;
  border-color: #155a73;
  color: #41d8f0;
}

.btn.danger {
  color: var(--danger);
  border-color: #583047;
  background: #211321;
}

.search-input,
input,
textarea,
select {
  max-width: 100%;
  background: #08131f;
  border: 1px solid #2a3b53;
  color: #e4efff;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  outline: none;
}

.search-input { width: min(360px, 100%); }

.search-input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #168ca6;
  box-shadow: 0 0 0 3px rgba(22,140,166,.12);
}

/* 数据表格 */
.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #26354d;
  border-radius: 14px;
  background: rgba(15,24,41,.96);
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 14px;
}

th {
  background: #172235;
  color: #a0b1cc;
  font-weight: 700;
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #2b3951;
}

td {
  padding: 15px 18px;
  height: 56px;
  border-bottom: 1px solid #202e43;
  color: #d1e1f7;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #152239; }
tbody tr:last-child td { border-bottom: 0; }

.empty {
  text-align: center;
  color: #8494b0;
  padding: 36px;
}

/* 更清晰的分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin: 28px auto 0;
  flex-wrap: wrap;
  color: #8494b0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid #2a3b53;
  border-radius: 9px;
  color: #d5e4f9;
  text-decoration: none;
  background: #0d1626;
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.pagination a:hover {
  border-color: var(--cyan);
  background: #102b3c;
  transform: translateY(-1px);
}

.pagination a.active {
  color: #eaffff;
  border-color: #08b8d8;
  background: linear-gradient(135deg, #087f9d, #0b526e);
  box-shadow: 0 0 18px rgba(8,184,216,.2);
  font-weight: 800;
}

.pagination .disabled { opacity: .38; }
.pagination .ellipsis { border-color: transparent; background: transparent; }

/* 提示、权限页 */
.notice {
  margin: 14px 0;
  padding: 13px 16px;
  border: 1px solid #15516a;
  border-radius: 9px;
  background: #0d2738;
  color: #61d9ed;
}

.locked {
  position: fixed;
  top: 50%;
  left: calc(50% + 140px);
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(520px, calc(100vw - 340px));
  padding: 36px 28px;
  border: 1px solid #263753;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17,27,45,.98), rgba(10,17,30,.98));
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
}

.lock {
  margin: 0 auto 22px;
  width: 94px;
  height: 94px;
  border: 1px solid #3c4b89;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9aa6ff;
  box-shadow: 0 0 35px rgba(41,48,107,.28);
}

.lock svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.locked h2 { font-size: 25px; margin: 0 0 12px; }
.locked h2 span { color: var(--cyan); }
.locked p,
.placeholder p {
  color: #91a0ba;
  font-size: 15px;
  margin: 8px 0 22px;
}

.placeholder {
  margin: 26px 0;
  padding: 34px;
  border: 1px solid #26354d;
  border-radius: 14px;
  background: #101a2b;
}

.placeholder h2 { font-size: 24px; }

/* 登录页 */
.auth-body { display: grid; place-items: center; padding: 24px; }

.auth-card {
  width: min(460px, 100%);
  padding: 38px;
  background: #101a2b;
  border: 1px solid #2b3b54;
  border-radius: 16px;
  box-shadow: 0 20px 70px #0005;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card h1 { margin: 4px 0; font-size: 28px; }
.auth-card p,
.auth-card small { color: #91a0ba; font-size: 14px; }
.auth-card label { color: #b6c4da; font-size: 14px; }
.auth-card input { width: 100%; padding: 13px 14px; }
.auth-card .btn { margin-top: 8px; padding: 12px; }
.brand-mark { font-weight: 800; color: var(--cyan); }

.alert {
  padding: 12px 14px;
  background: #3b1724;
  border: 1px solid #713048;
  color: #ffb7c6;
  border-radius: 8px;
  font-size: 14px;
}

/* 响应式布局 */
@media (min-width: 1900px) {
  .stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1500px) {
  .sidebar { width: 240px; }
  .main { margin-left: 240px; padding: 26px; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card { padding: 20px; }
  .locked { left: calc(50% + 120px); width: min(480px, calc(100vw - 300px)); }
}

@media (max-width: 1050px) {
  .sidebar { width: 205px; padding: 22px 10px; }
  .brand { font-size: 19px; padding-left: 10px; }
  .sidebar nav a { min-height: 44px; font-size: 13px; gap: 10px; padding: 0 10px; }
  .main { margin-left: 205px; padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .hero-title { font-size: 30px; }
  .stat-card { min-height: 145px; }
  .stat-value { font-size: 22px; }
  .locked { left: calc(50% + 102px); width: calc(100vw - 240px); }
}

@media (max-width: 680px) {
  .sidebar {
    width: 66px;
    padding: 14px 7px;
  }
  .brand {
    font-size: 0;
    padding: 5px 0 20px;
    text-align: center;
  }
  .brand:first-letter { font-size: 17px; }
  .sidebar nav { gap: 6px; }
  .sidebar nav a {
    justify-content: center;
    padding: 0;
    min-height: 42px;
    font-size: 0;
    gap: 0;
  }
  .nav-icon { width: 22px; height: 22px; }
  .main { margin-left: 66px; padding: 14px; }
  .topbar { align-items: flex-start; }
  .topbar strong { font-size: 16px; }
  .user-chip { font-size: 11px; padding: 5px 8px; }
  .stats-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero-title { font-size: 24px; margin: 18px 0; }
  .stat-card { min-height: 120px; padding: 17px; }
  .stat-label { font-size: 13px; }
  .stat-value { font-size: 21px; }
  .stat-sub { font-size: 12px; }
  .toolbar { align-items: stretch; }
  .toolbar > span { width: 100%; margin-left: 0; }
  .search-input { width: 100%; }
  .pagination { gap: 5px; }
  .pagination a,
  .pagination span { min-width: 34px; min-height: 36px; padding: 0 8px; font-size: 12px; }
  .locked {
    position: fixed;
    left: calc(50% + 33px);
    width: calc(100vw - 100px);
    padding: 24px 16px;
  }
  .locked h2 { font-size: 20px; }
  .locked p { font-size: 13px; }
  .lock { width: 72px; height: 72px; }
  .lock svg { width: 30px; height: 30px; }
  .auth-card { padding: 26px; }
}
