/* 光域 GUANGYU 内容管理后台 · 深色电影感主题 */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: auto; overflow-y: visible; }

body {
  min-height: 100vh;
  background: #191919;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- 顶部（登录页） ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 32px;
  background: rgba(25, 25, 25, .86);
  border-bottom: 1px solid #262626;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .5px; color: #fff; }
.brand-name em {
  font-style: normal;
  color: #C7E23F;
  font-weight: 600;
  font-size: 13px;
  margin-left: 8px;
  letter-spacing: 1px;
}

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 20px 48px;
  background:
    radial-gradient(1100px 480px at 72% -8%, rgba(199, 226, 63, .07), transparent 60%),
    #191919;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #222;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 40px 36px 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 4px;
}
.login-sub {
  text-align: center;
  color: #777;
  font-size: 11px;
  letter-spacing: 2px;
  margin: 8px 0 30px;
}
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; color: #999; font-size: 13px; margin-bottom: 6px; }

/* ---------- 通用控件 ---------- */
.inp {
  width: 100%;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.inp::placeholder { color: #666; }
.inp:focus { border-color: #C7E23F; box-shadow: 0 0 0 3px rgba(199, 226, 63, .14); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 20px;
  white-space: nowrap;
  transition: opacity .15s, background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: #C7E23F; color: #111; font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: #d3ec52; }

.btn-ghost { background: transparent; color: #eee; border-color: #444; }
.btn-ghost:hover:not(:disabled) { border-color: #C7E23F; color: #C7E23F; }

.btn-outline { background: transparent; color: #999; border-color: #333; }
.btn-outline:hover:not(:disabled) { color: #fff; border-color: #666; }

.btn-block { width: 100%; margin-top: 10px; }

.login-error {
  display: none;
  background: rgba(255, 82, 82, .1);
  border: 1px solid rgba(255, 82, 82, .4);
  color: #ff8080;
  border-radius: 8px;
  padding: 9px 12px;
  margin: 2px 0 14px;
  font-size: 13px;
}
.login-error.show { display: block; }

/* ---------- 管理页 ---------- */
.manage-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(25, 25, 25, .92);
  border-bottom: 1px solid #262626;
  z-index: 50;
}
.manage-bar-left { display: flex; align-items: center; gap: 12px; }
.brand-logo-sm { width: 28px; height: 28px; object-fit: contain; }
.manage-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 2px; }
.manage-bar-right { display: flex; align-items: center; gap: 10px; }

.manage-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 84px 24px 64px;
}

.row {
  display: flex; align-items: center; gap: 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

/* 分组行 */
.group-row { background: #20201c; border-color: #3a3a2c; }
.group-bar {
  width: 4px;
  align-self: stretch;
  background: #C7E23F;
  border-radius: 2px;
  flex: none;
}
.group-name {
  flex: 1;
  font-weight: 700;
  color: #C7E23F;
  letter-spacing: .5px;
  cursor: text;
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-name:hover { text-decoration: underline; }
.rename-inp { flex: 1; }

/* 案例行 */
.case-row .inp { flex: 1; min-width: 0; }
.case-row .inp-metric { flex: .7; }
.case-row .inp-note { flex: 1.6; }

.show-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  color: #999; font-size: 13px; cursor: pointer; white-space: nowrap; flex: none;
}
.show-toggle input { width: 15px; height: 15px; accent-color: #C7E23F; cursor: pointer; }

.icon-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #999;
  border: 1px solid #333; border-radius: 6px;
  font-size: 14px; cursor: pointer; flex: none;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: #fff; border-color: #666; }
.icon-btn.danger:hover { color: #ff8080; border-color: #ff8080; background: rgba(255, 82, 82, .08); }

.empty-tip {
  text-align: center;
  color: #666;
  font-size: 13px;
  padding: 60px 0;
}

/* ---------- 提示浮层 ---------- */
.toast {
  display: none;
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.toast.ok { background: #C7E23F; color: #111; font-weight: 700; }
.toast.err { background: #381b1b; color: #ff8080; border: 1px solid rgba(255, 82, 82, .4); }

@media (max-width: 760px) {
  .manage-bar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .manage-bar-right { flex-wrap: wrap; }
  .manage-wrap { padding-top: 120px; }
  .row { flex-wrap: wrap; }
  .case-row .inp { min-width: 100%; }
}
