/* ============================================================
 * 管理后台布局：浅色内容 + 深蓝侧栏
 * ============================================================ */

/* ===== 登录页 ===== */
.login-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #eef3ff 0%, #f6f8fd 55%, #eef1fb 100%);
}
.login-view::before,
.login-view::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
}
.login-view::before { width: 520px; height: 520px; background: #cfe0ff; top: -180px; left: -120px; }
.login-view::after  { width: 460px; height: 460px; background: #e6d9ff; bottom: -200px; right: -120px; }

.login-card {
  position: relative; width: 404px;
  padding: 40px 36px 30px;
  background: #fff;
  border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(23, 35, 64, 0.14);
  overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
}
.login-card .btn-block { margin-top: 4px; }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-logo .mark {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  box-shadow: 0 8px 18px rgba(59,109,246,.35);
}
.login-logo h1 { font-size: 18px; letter-spacing: .2px; }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.login-err {
  margin-top: 14px; padding: 9px 12px;
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: var(--radius-sm); font-size: 12px; display: none;
}
.login-err.show { display: block; }

/* ===== 主布局 ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏（深蓝） ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1c2542 0%, #141b30 100%);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  box-shadow: 2px 0 12px rgba(23, 35, 64, 0.08);
}
.brand {
  height: var(--topbar-height);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #6f9bff, #8a5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.brand-text .t { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .3px; }
.brand-text .s { font-size: 11px; color: #8592ad; }

.nav { flex: 1; overflow-y: auto; padding: 12px 12px 16px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: 9px;
  color: #a9b4cc; cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(111,155,255,.18); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 0 3px 3px 0; background: #6f9bff;
}
.nav-item .ico { width: 18px; text-align: center; font-size: 14px; opacity: .95; }

.sidebar-foot {
  padding: 13px 20px; border-top: 1px solid rgba(255,255,255,.07);
  font-size: 11px; color: #7f8aa6; text-align: center;
}

/* ===== 主内容 ===== */
.main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

/* ===== 顶栏 ===== */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.breadcrumb { font-size: 15px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-info { font-size: 12px; color: var(--text-secondary); }
.topbar-info b { color: var(--text-primary); font-weight: 600; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.logout-btn {
  font-size: 12px; color: var(--text-secondary); cursor: pointer;
  padding: 5px 12px; border: 1px solid var(--border-light); border-radius: 20px;
  transition: all .15s; background: #fff;
}
.logout-btn:hover { color: var(--accent); border-color: rgba(59,109,246,.4); background: var(--accent-light); }

/* ===== 内容区 ===== */
.content { flex: 1; padding: 22px 24px 40px; overflow-y: auto; }
.content > * { animation: fadeUp .18s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===== Tab 切换 ===== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 10px 18px; cursor: pointer; font-size: 14px; color: var(--text-secondary);
  border-bottom: 2px solid transparent; transition: all .15s; user-select: none;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; background: var(--danger); color: #fff; font-size: 11px;
  border-radius: 9px; text-align: center; margin-left: 6px; font-weight: 500;
}
