:root {
  --brand: #e60012;
  --brand-dark: #c40010;
  --brand-soft: #fde8ea;
  --sidebar-bg: #f5f5f5;
  --sidebar-text: #4a4a4a;
  --sidebar-active: #e60012;
  --page-bg: #f7f5f4;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #8a8582;
  --line: #ebe6e3;
  --shadow: 0 8px 24px rgba(31, 31, 31, 0.04);
}

* { box-sizing: border-box; }

html, body, #app {
  margin: 0;
  height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

.el-button--primary {
  --el-button-bg-color: var(--brand);
  --el-button-border-color: var(--brand);
  --el-button-hover-bg-color: var(--brand-dark);
  --el-button-hover-border-color: var(--brand-dark);
  --el-button-active-bg-color: var(--brand-dark);
  --el-button-active-border-color: var(--brand-dark);
}
.el-pagination.is-background .el-pager li.is-active {
  background-color: var(--brand) !important;
}

.boot-screen,
.login-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(230, 0, 18, 0.12), transparent 60%),
    linear-gradient(160deg, #fff5f5 0%, #f7f5f4 45%, #f0ecea 100%);
}

.login-card {
  width: 400px;
  padding: 40px 36px 32px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.login-title {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--brand);
  font-weight: 700;
}

.login-hint {
  margin: -4px 0 16px;
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

.login-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.login-captcha .el-input {
  flex: 1;
}

.login-captcha-img {
  width: 120px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f2ef;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.login-captcha-img img {
  width: 100%;
  height: 100%;
  display: block;
}

.login-captcha-img:disabled {
  opacity: 0.7;
  cursor: wait;
}


.login-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: flex;
  height: 100%;
}

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.logo {
  padding: 22px 12px 18px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar .el-menu {
  border-right: none;
  background: transparent;
}

.sidebar .el-menu-item.is-active {
  background: var(--brand) !important;
  color: #fff !important;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  min-height: 64px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.content {
  padding: 20px 24px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.panel {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.spot-photo-thumb,
.spot-outline-thumb {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}
.spot-photo-thumb {
  background: #eee;
  border: 1px solid var(--line, #e5e1dc);
  cursor: zoom-in;
}
.spot-outline-thumb {
  background: #1a1a1a;
  border: 1px solid #333;
}
.spot-outline-thumb--click {
  cursor: zoom-in;
}
.spot-photo-thumb img,
.spot-outline-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.spot-photo-thumb--lg,
.spot-outline-thumb--lg {
  width: 120px;
  height: 80px;
}
.spot-photo-thumb--lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 弹窗预览：深色实底，透明轮廓可读 */
.media-preview-stage {
  min-height: 360px;
  max-height: 70vh;
  background: #111;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.media-preview-stage.is-outline {
  background:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, #2a2a2a 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #2a2a2a 75%) -8px 0 / 16px 16px,
    #1a1a1a;
}
.media-preview-stage img {
  max-width: 100%;
  max-height: 66vh;
  object-fit: contain;
  display: block;
}

.link-view {
  color: var(--brand);
  cursor: pointer;
  margin-right: 12px;
}

.link-del {
  color: var(--muted);
  cursor: pointer;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  vertical-align: middle;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  border: 1px solid var(--line);
}

.avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.avatar-fallback.lg {
  width: 88px;
  height: 88px;
  font-size: 28px;
}

.profile-avatar-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
}

.profile-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 10px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}

.form-tip {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.55;
}

.form-tip.warn {
  color: #a3211c;
}

.form-tip.inline {
  margin-top: 0;
  margin-left: 12px;
}

/* 系统设置：分区卡片，统一字号与间距 */
.settings-page {
  max-width: 880px;
}

.settings-lead {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #faf8f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.settings-lead b {
  color: var(--text);
  font-weight: 600;
}

.settings-section {
  margin-bottom: 16px;
  padding: 18px 18px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.settings-section .profile-card-title {
  margin-bottom: 14px;
}

.settings-section .el-form-item {
  margin-bottom: 16px;
}

.settings-section .el-form-item__label {
  color: #4a4a4a;
  font-weight: 500;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 0 4px;
}

.settings-status-miss {
  color: #c00;
  font-size: 13px;
}

.settings-status-ok {
  color: var(--muted);
  font-size: 13px;
}

/* 首页运营概览 */
.home-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-hello {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.home-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.home-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px 14px;
  min-height: 108px;
}

.home-kpi.warn {
  cursor: pointer;
  border-color: #f3c7c5;
  background: #fff8f7;
}

.home-kpi-label {
  font-size: 12px;
  color: var(--muted);
}

.home-kpi-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-kpi-slash {
  color: #ccc;
  font-weight: 500;
  margin: 0 2px;
}

.home-kpi-extra {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.home-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 12px;
}

.home-block-wide {
  grid-column: 1 / -1;
}

.home-block .profile-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-todo {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-todo li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.home-todo li:last-child {
  border-bottom: none;
}

.home-todo li.ok {
  color: var(--muted);
}

.home-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text);
}

.home-status-meta {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-shortcut {
  border: 1px solid var(--line);
  background: #faf8f7;
  color: var(--text);
  border-radius: 8px;
  padding: 12px 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.home-shortcut:hover {
  border-color: #f0b6b4;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.home-empty {
  padding: 28px 0 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1280px) {
  .home-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .home-kpi-grid,
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-block-wide {
    grid-column: auto;
  }
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

.profile-avatar-box .el-avatar {
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
}
