:root {
  --brand: #2bb673;
  --brand-dark: #1f9a5f;
  --brand-soft: #e8f8f0;
  --sidebar-bg: #14352a;
  --sidebar-bg-2: #0f2920;
  --sidebar-text: rgba(255, 253, 247, 0.72);
  --sidebar-active: #2bb673;
  --page-bg: #f4fbf8;
  --card: #ffffff;
  --text: #1f2a25;
  --muted: #72807b;
  --line: #e3efe8;
  --danger: #e27c5a;
  --warn: #d4a017;
  --shadow: 0 8px 24px rgba(32, 37, 34, 0.05);
}

* { 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);
}

/* Element primary override */
.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;
}
.el-switch.is-checked .el-switch__core {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* Boot */
.boot-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Login */
.login-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(43, 182, 115, 0.18), transparent 60%),
    radial-gradient(700px 360px at 100% 100%, rgba(32, 37, 34, 0.06), transparent 55%),
    linear-gradient(160deg, #eef8f3 0%, #f7fcfa 45%, #eef3f1 100%);
}

.login-card {
  width: 400px;
  padding: 40px 36px 32px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(43, 182, 115, 0.12);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.login-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #3cc984, #2bb673);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 10px 20px rgba(43, 182, 115, 0.28);
}

.login-card h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

/* Layout */
.layout {
  display: flex;
  height: 100%;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

.sidebar.is-collapsed {
  width: 72px;
}

.brand {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 700;
  font-size: 15px;
}

.brand-text span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.65;
  margin-top: 1px;
}

.sidebar.is-collapsed .brand-text {
  display: none;
}

.side-menu {
  border-right: none !important;
  background: transparent !important;
  flex: 1;
  padding: 10px 8px;
  overflow: auto;
}

.side-menu .el-menu-item {
  height: 44px;
  line-height: 44px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--sidebar-text) !important;
}

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

.side-menu .el-menu-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--page-bg);
}

.topbar {
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.collapse-btn {
  border: none;
  background: var(--brand-soft);
  color: var(--brand-dark);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.topbar .title-wrap {
  min-width: 0;
}

.topbar .title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.topbar .desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

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

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.content {
  flex: 1;
  padding: 18px 20px 28px;
  overflow: auto;
}

/* Dashboard */
.stat-row {
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  min-height: 108px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(32, 37, 34, 0.08);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent, var(--brand));
}

.stat-card .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.stat-card .value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-card .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Panels */
.panel {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.toolbar .spacer {
  flex: 1;
}

.pager {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.cover-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef6f3;
  display: block;
}

.name-en {
  font-weight: 700;
}

.name-zh {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.status-ok { color: var(--brand); font-weight: 700; }
.status-bad { color: var(--danger); font-weight: 700; }
.status-warn { color: var(--warn); font-weight: 700; }

.method-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.drawer-section {
  margin-bottom: 18px;
}

.drawer-section h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audio-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.audio-stat.warn {
  background: #fff4e8;
  color: #b36b00;
}

.empty-hint {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.el-table {
  --el-table-border-color: var(--line);
  --el-table-header-bg-color: #f7fbf9;
}

.el-drawer__header {
  margin-bottom: 8px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.el-drawer__body {
  padding-top: 8px !important;
}
