/* =============================================================================
   奥睿科智能教学控制系统 · 配置中心 —— 公共样式
   供 login.html（登录 + 控制台）/ settings.html 共用
============================================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; }
/* 覆盖 Element Plus 默认字体变量，移除 Arial 等高发字体 */
:root {
  --el-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    system-ui, sans-serif;
}
body {
  font-family: var(--el-font-family);
  background: var(--el-bg-color-page, #f5f7fa);
  color: var(--el-text-color-primary, #1e293b);
}
[v-cloak] { display: none !important; }

html.dark .config-card { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }

/* ========== 登录界面 ========== */
.login-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #162a5e 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 420px;
  max-width: 92%;
  background: #ffffff;
  border-radius: 12px;
  padding: 44px 36px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* 返回官网（登录页左上角） */
.back-home {
  position: absolute;
  top: 22px;
  left: 26px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 8px 15px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}
.back-home:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
  transform: translateX(-2px);
}

/* 品牌区：盾牌 + 运维平台 */
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.brand-shield {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1f5fff);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}
.login-brand-text { min-width: 0; }
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #162a5e;
  line-height: 1.2;
  margin-bottom: 3px;
}
.login-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.login-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -6px 0 16px;
  font-size: 13px;
}

/* ========== 主界面布局 ========== */
.layout {
  height: 100vh;
  display: flex;
  overflow: hidden;
}
.sidebar {
  width: 232px;
  background: #0f172a;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.logo {
  height: 60px;
  line-height: 60px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 1px;
  flex-shrink: 0;
}
.logo-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.logo-full .logo-shield { color: #22d3ee; }
.logo-mini {
  display: none;
  align-items: center;
  justify-content: center;
  color: #22d3ee;
}
.platform-menu {
  flex: 1;
  overflow-y: auto;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.platform-menu.el-menu { border-right: none; }
.platform-menu .el-menu-item {
  height: 50px;
  line-height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
}
.platform-menu .el-menu-item .menu-ico {
  flex: 0 0 auto;
  margin-right: 10px;
  font-size: 18px;
}
.platform-menu .menu-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.platform-menu .el-menu-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
.platform-menu .el-menu-item.is-active {
  background: rgba(37, 99, 235, 0.3) !important;
}
/* 长名称悬停提示气泡（暗色，贴合侧边栏） */
.menu-name-tip.el-popper {
  font-size: 13px;
  max-width: 340px;
  word-break: break-all;
}
.platform-menu::-webkit-scrollbar { width: 6px; }
.platform-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.platform-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-footer {
  padding: 10px 0;
  flex-shrink: 0;
}
.setting-btn {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 14px 10px 20px;
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 14px;
}
.setting-btn .el-icon {
  flex: 0 0 auto;
  width: 24px;
  margin-right: 10px;
  font-size: 18px;
}
.setting-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.setting-text { margin-left: 0; }

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.header {
  height: 60px;
  background: var(--el-bg-color, #fff);
  border-bottom: 1px solid var(--el-border-color-light, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.page-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--el-text-color-primary, #1e293b);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--el-text-color-secondary, #64748b);
  font-size: 14px;
}
.admin-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}
.content-body::-webkit-scrollbar { width: 8px; }
.content-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
.content-body::-webkit-scrollbar-track { background: transparent; }
html.dark .content-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }

.config-card {
  background: var(--el-bg-color, #fff);
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--el-text-color-primary, #1e293b);
  margin-bottom: 20px;
  padding-left: 10px;
  border-left: 3px solid #2563eb;
}
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* 平台预览 */
.platform-preview { max-width: 520px; }
.preview-item {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  align-items: center;
}
.preview-item:last-of-type { border-bottom: none; }
.preview-label {
  width: 100px;
  color: #64748b;
  flex-shrink: 0;
}
.preview-value {
  color: var(--el-text-color-primary, #1e293b);
  flex: 1;
}
.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f2f5;
}
.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.preview-title-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--el-text-color-primary, #1e293b);
}
.preview-sub-text {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

/* 头部“返回官网”按钮（控制台） */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.back-home-ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* 系统设置独立页 */
.settings-card {
  background: var(--el-bg-color, #fff);
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 460px;
}
.settings-tabs {
  max-width: 1100px;
  margin: 0 auto;
}
.settings-tabs .el-tabs__content { overflow: visible; }
.settings-pane { max-width: 760px; }
.settings-pane-wide { max-width: 100%; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 全局加载遮罩 */
.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--el-bg-color-page, #f5f7fa);
  color: var(--el-text-color-secondary, #64748b);
  flex-direction: column;
  gap: 14px;
}

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px !important;
    min-width: 60px !important;
    flex-basis: 60px;
  }
  .logo { height: 54px; line-height: 54px; }
  .logo-full { display: none; }
  .logo-mini { display: flex; align-items: center; justify-content: center; }
  .platform-menu { width: 60px !important; min-width: 0 !important; }
  .platform-menu .el-menu-item {
    width: 60px;
    height: 52px;
    line-height: 52px;
    padding: 0 !important;
    margin: 0;
    justify-content: center;
  }
  .platform-menu .el-menu-item .el-icon { margin-right: 0; }
  .platform-menu .el-menu-item .el-menu-tooltip__trigger,
  .platform-menu .el-menu-item span { display: none; }
  .sidebar-footer { padding: 10px 0; }
  .setting-btn { justify-content: center; padding: 10px 0; }
  .setting-btn .el-icon { margin-right: 0; }
  .setting-btn span { display: none; }
  .header { padding: 0 12px; height: 54px; gap: 8px; }
  .header-right { gap: 8px; flex-shrink: 0; }
  .page-title { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-name { display: none; }
  .back-home-txt { display: none; }
  .back-home-btn { padding: 7px 9px; }
  .content-body { padding: 12px; }
  .config-card { padding: 18px 16px; }
  .settings-card { padding: 16px 14px; }
  .section-title { font-size: 15px; }
  .el-input__inner, .el-textarea__inner { font-size: 16px !important; }
}
@media (max-width: 480px) {
  .login-box { width: 92%; padding: 36px 24px 30px; }
  .platform-preview { max-width: 100%; }
  .preview-label { width: 84px; }
}
