/* ============================================================
   音创商务代办后台 - 样式表
   设计基调：深色商务侧边栏 + 浅灰工作区，墨绿/藏青主色
   禁止使用紫色、禁止使用 emoji 表情
   ============================================================ */

:root {
  --c-primary: #0f766e;      /* 墨绿主色 */
  --c-primary-d: #0b5a54;
  --c-accent: #1e3a5f;       /* 藏青辅助 */
  --c-bg: #f0f2f5;
  --c-card: #ffffff;
  --c-border: #e3e6eb;
  --c-text: #1f2937;
  --c-text-2: #6b7280;
  --c-success: #15803d;
  --c-warn: #b45309;
  --c-danger: #b91c1c;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  background: #0f1b2d;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 20;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px;
  background: linear-gradient(135deg, var(--c-primary), #14b8a6);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.brand-text strong { display: block; color: #fff; font-size: 15px; }
.brand-text span { font-size: 12px; color: #8b97a8; }

.nav { padding: 14px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 7px;
  color: #cbd5e1; text-decoration: none; font-size: 14px;
  margin-bottom: 4px; transition: background .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--c-primary); color: #fff; font-weight: 600; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.env-tag { font-size: 11px; color: #6b7787; letter-spacing: .5px; }

.main { flex: 1; margin-left: 232px; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 60px; background: var(--c-card); border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--c-text); }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.admin-info { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-accent); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.admin-meta strong { display: block; font-size: 13px; line-height: 1.2; }
.admin-meta span { font-size: 11px; color: var(--c-text-2); }
.btn-logout {
  font-size: 13px; color: var(--c-text-2); text-decoration: none;
  border: 1px solid var(--c-border); padding: 6px 14px; border-radius: 6px;
}
.btn-logout:hover { border-color: var(--c-danger); color: var(--c-danger); }

.content { padding: 26px 28px; flex: 1; }
.page-footer {
  padding: 16px 28px; border-top: 1px solid var(--c-border);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--c-text-2);
  background: var(--c-card);
}

/* ---------- 卡片 / 面板 ---------- */
.panel {
  background: var(--c-card); border: 1px solid var(--c-border);
  border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-head .sub { font-size: 12px; color: var(--c-text-2); }
.panel-body { padding: 20px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: 10px;
  padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c-primary);
}
.stat-card .label { font-size: 13px; color: var(--c-text-2); }
.stat-card .value { font-size: 30px; font-weight: 700; color: var(--c-text); margin-top: 6px; }
.stat-card .value small { font-size: 14px; color: var(--c-text-2); font-weight: 400; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 12px 16px; background: #f8fafc;
  color: var(--c-text-2); font-weight: 600; border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid #f1f3f5; vertical-align: top; }
.table tr:hover td { background: #f8fafc; }
.table .mono { font-family: Consolas, monospace; font-size: 12px; color: var(--c-text-2); }
.table .ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 标签 / 状态 ---------- */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.tag-pending { background: #fef3c7; color: var(--c-warn); }
.tag-pass { background: #dcfce7; color: var(--c-success); }
.tag-reject { background: #fee2e2; color: var(--c-danger); }
.tag-normal { background: #e0f2fe; color: #0369a1; }
.tag-disabled { background: #e5e7eb; color: #6b7280; }
.tag-yes { background: #dcfce7; color: var(--c-success); }
.tag-no { background: #f1f5f9; color: var(--c-text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; border: 1px solid transparent;
  font-size: 13px; cursor: pointer; text-decoration: none; font-weight: 500;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-d); }
.btn-ghost { background: #fff; border-color: var(--c-border); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-danger { background: #fff; border-color: var(--c-danger); color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--c-text-2); }
.field input, .field select, .field textarea {
  border: 1px solid var(--c-border); border-radius: 6px; padding: 9px 12px;
  font-size: 13px; font-family: inherit; min-width: 200px; background: #fff; color: var(--c-text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }

/* 批量删除动作栏 */
.toolbar-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 16px;
  background: #f8fafc; border: 1px solid var(--c-border); border-radius: 8px;
}
.toolbar-actions .ta-tip { font-size: 13px; color: var(--c-text-2); }
.toolbar-actions .ta-form { display: inline-flex; }
.toolbar-actions .btn-sm { margin: 0; }

/* 操作列内的删除表单 */
td.op { white-space: nowrap; }
td.op .op-del { display: inline; }
td.op .btn { margin-right: 6px; }

/* 操作结果提示 */
.alert-ok {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
  padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 500;
}

/* ---------- 详情抽屉 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: none; align-items: flex-start; justify-content: flex-end; z-index: 50;
}
.modal-mask.show { display: flex; }
.modal {
  width: 480px; max-width: 92vw; background: #fff; height: 100%; overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,.15); animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: #fff;
}
.modal-head h3 { font-size: 16px; }
.modal-close { cursor: pointer; font-size: 22px; color: var(--c-text-2); border: none; background: none; }
.modal-body { padding: 22px; }
.detail-item { display: flex; padding: 11px 0; border-bottom: 1px dashed var(--c-border); }
.detail-item .k { width: 120px; color: var(--c-text-2); flex-shrink: 0; font-size: 13px; }
.detail-item .v { flex: 1; font-size: 13px; word-break: break-all; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--c-border); display: flex; gap: 10px; position: sticky; bottom: 0; background: #fff; }
.review-note { width: 100%; border: 1px solid var(--c-border); border-radius: 6px; padding: 10px; resize: vertical; min-height: 70px; font-family: inherit; }

/* ---------- 登录页 ---------- */
.login-body { background: #0f1b2d; }
.login-wrap {
  display: flex; min-height: 100vh; max-width: 1040px; margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-left {
  flex: 1; background: linear-gradient(150deg, #0f1b2d, #14304a);
  color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand strong { display: block; font-size: 18px; }
.login-brand span { font-size: 12px; color: #8b97a8; }
.login-slogan h2 { font-size: 30px; line-height: 1.35; margin-bottom: 18px; font-weight: 700; }
.login-slogan p { color: #aeb9c7; font-size: 14px; line-height: 1.8; margin-bottom: 28px; }
.login-points { list-style: none; }
.login-points li {
  color: #cbd5e1; font-size: 13px; padding: 9px 0 9px 22px; position: relative; border-top: 1px solid rgba(255,255,255,.06);
}
.login-points li::before { content: ''; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }

.login-right { width: 400px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form { width: 100%; }
.login-form h3 { font-size: 22px; margin-bottom: 6px; }
.login-tip { color: var(--c-text-2); font-size: 13px; margin-bottom: 26px; }
.login-error { background: #fee2e2; color: var(--c-danger); padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 18px; }
.login-form label { display: block; font-size: 13px; color: var(--c-text-2); margin-bottom: 7px; margin-top: 16px; }
.login-form input {
  width: 100%; border: 1px solid var(--c-border); border-radius: 7px; padding: 12px 14px;
  font-size: 14px; font-family: inherit;
}
.login-form input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.login-form button {
  width: 100%; background: var(--c-primary); color: #fff; border: none; border-radius: 7px;
  padding: 13px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 26px;
}
.login-form button:hover { background: var(--c-primary-d); }
.login-foot { text-align: center; font-size: 12px; color: var(--c-text-2); margin-top: 22px; }

/* ---------- 接口文档 ---------- */
.doc-section { margin-bottom: 26px; }
.doc-section h4 {
  font-size: 15px; padding: 10px 14px; background: #f8fafc; border-left: 4px solid var(--c-primary);
  border-radius: 0 6px 6px 0; margin-bottom: 14px;
}
.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.kv-table th, .kv-table td { border: 1px solid var(--c-border); padding: 9px 12px; text-align: left; }
.kv-table th { background: #f8fafc; color: var(--c-text-2); width: 160px; font-weight: 600; }
.kv-table code, .inline-code {
  background: #111827; color: #d1fae5; padding: 2px 7px; border-radius: 4px;
  font-family: Consolas, monospace; font-size: 12px;
}
.method-tag { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 700; color: #fff; }
.method-post { background: var(--c-success); }
.method-get { background: #0369a1; }
.code-block {
  background: #111827; color: #e5e7eb; padding: 16px; border-radius: 8px;
  font-family: Consolas, monospace; font-size: 12.5px; line-height: 1.7; overflow-x: auto; white-space: pre;
  margin: 8px 0 4px;
}
.code-block .cm { color: #6b7280; }
.copy-btn { font-size: 12px; color: var(--c-primary); cursor: pointer; border: 1px solid var(--c-border); padding: 2px 10px; border-radius: 4px; background: #fff; }
.field-req { color: var(--c-danger); }

.empty { text-align: center; color: var(--c-text-2); padding: 40px 0; font-size: 13px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 13px; color: var(--c-text-2); text-decoration: none; }
.pager .cur { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
