﻿/* 农场运营台 · 授权中心控制台
   深色、紧凑、桌面优先；手机端自动收起侧栏。 */
:root {
  --bg: #080c13;
  --bg2: #0c121c;
  --panel: #101826;
  --panel2: #141f30;
  --line: #1d2b3f;
  --line2: #273951;
  --text: #e7eef9;
  --muted: #8ea0b8;
  --dim: #5d7089;
  --accent: #3b82f6;
  --accent2: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
  --radius: 12px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .35);
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: radial-gradient(1000px 600px at 75% -10%, #12233c 0%, transparent 55%),
                        radial-gradient(800px 500px at -10% 110%, #10231f 0%, transparent 50%), var(--bg);
  color: var(--text); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI",
  "Microsoft YaHei", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: .2px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(59, 130, 246, .35); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #22334a; border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 228px; flex: 0 0 228px; padding: 20px 14px; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, #0d1522, #0a1019 70%);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #0891b2); font-size: 19px;
  box-shadow: 0 6px 18px rgba(29, 78, 216, .35);
}
.brand b { display: block; font-size: 15px; line-height: 1.25; }
.brand small { color: var(--dim); font-size: 11px; letter-spacing: .4px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-size: 13.5px; transition: .15s; border: 1px solid transparent;
}
.nav a svg { width: 17px; height: 17px; opacity: .8; }
.nav a:hover { background: #131f31; color: var(--text); }
.nav a.on { background: linear-gradient(90deg, #16283f, #122031); color: #dceaff;
  border-color: #24405f; box-shadow: inset 2px 0 0 var(--accent); }
.nav a.on svg { opacity: 1; color: #7dd3fc; }
.side-foot { margin-top: auto; padding: 14px 10px 2px; color: var(--dim); font-size: 11px;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.side-foot .who { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12.5px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #1b2c43; color: #9fd6ff; font-size: 12px; font-weight: 700; }
.main { flex: 1; min-width: 0; padding: 22px 28px 56px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.topbar h1 { font-size: 22px; }
.topbar p { margin: 4px 0 0; color: var(--dim); font-size: 12.5px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.view { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------- 通用 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line2);
  background: #152135; color: var(--text); cursor: pointer; font-size: 13px;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #3a557a; background: #1a2a42; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #2f7ef7, #2563eb); border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.green { background: #143627; border-color: #1f6f4a; color: #9af0c3; }
.btn.danger { background: #3a1520; border-color: #7f2334; color: #ffb3c0; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn.icon { padding: 7px 9px; }
.btn-row { display: flex; gap: 7px; flex-wrap: wrap; }
.card {
  background: linear-gradient(180deg, rgba(20, 31, 48, .92), rgba(16, 24, 38, .92));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px;
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; }
.card-h h3 { font-size: 14.5px; }
.card-h .sub { color: var(--dim); font-size: 12px; margin-top: 3px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mb0 { margin-bottom: 0; }
.hr { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pill.green { color: #86efac; border-color: #1f6f4a; background: #0f2a1d; }
.pill.amber { color: #fcd34d; border-color: #7c5a12; background: #2a2109; }
.pill.red { color: #fca5a5; border-color: #7f2334; background: #2a1118; }
.pill.blue { color: #93c5fd; border-color: #1e4f8a; background: #0f2038; }
.pill.purple { color: #c4b5fd; border-color: #5b21b6; background: #1e153a; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------------- 统计卡 ---------------- */
.stat { position: relative; overflow: hidden; padding: 16px 17px; }
.stat::after { content: ""; position: absolute; right: -30px; top: -40px; width: 110px; height: 110px;
  border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 70%); }
.stat .k { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 27px; font-weight: 700; margin-top: 7px; letter-spacing: .4px; }
.stat .f { color: var(--dim); font-size: 11.5px; margin-top: 3px; }
.stat.green .v { color: #72e6a0; } .stat.amber .v { color: #fbbf24; }
.stat.red .v { color: #f87171; } .stat.blue .v { color: #7dd3fc; }
.stat.purple .v { color: #c4b5fd; }

/* ---------------- 图表 ---------------- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 12px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%; justify-content: flex-end; }
.chart .bar { width: 62%; min-height: 3px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #38bdf8, #1d4ed8); opacity: .9; transition: .3s; }
.chart .bar:hover { opacity: 1; filter: brightness(1.2); }
.chart .lab { color: var(--dim); font-size: 10px; transform: scale(.92); }
.chart .num { color: var(--muted); font-size: 10.5px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: middle; }
th { background: #0e1725; color: var(--muted); font-weight: 550; font-size: 11.5px;
  letter-spacing: .4px; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tbody tr:hover { background: #121d2d; }
tbody tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; }
.empty { padding: 36px 10px; text-align: center; color: var(--dim); font-size: 13px; }
.empty .big { font-size: 26px; opacity: .5; display: block; margin-bottom: 8px; }
.keycode { font-family: var(--mono); font-size: 12px; color: #bae6fd; letter-spacing: .4px; white-space: nowrap; }
.keycode .cp { cursor: pointer; color: var(--dim); margin-left: 5px; }
.keycode .cp:hover { color: var(--accent2); }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px;
  color: var(--dim); font-size: 12px; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field > label, .lbl { color: var(--muted); font-size: 12px; }
.inp, select.inp, textarea.inp {
  width: 100%; background: #0b1320; border: 1px solid var(--line2); border-radius: 8px;
  padding: 9px 11px; outline: none; transition: .15s; color: var(--text);
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .16); }
textarea.inp { resize: vertical; min-height: 72px; }
.hint { color: var(--dim); font-size: 11.5px; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline .inp { width: auto; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch i { width: 34px; height: 19px; border-radius: 999px; background: #24344b; position: relative;
  transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: #8fa3bd; top: 3px; left: 3px; transition: .2s; }
.switch input:checked + i { background: #1d4ed8; }
.switch input:checked + i::after { left: 18px; background: #fff; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.check input { accent-color: #2563eb; }

/* ---------------- 弹窗 / toast ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(3, 7, 13, .72); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal { width: min(620px, 96vw); max-height: 90vh; overflow: auto; background: #101a29;
  border: 1px solid #29405d; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .16s ease; }
.modal.wide { width: min(860px, 96vw); }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 15px; }
.modal-b { padding: 18px 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px;
  border-top: 1px solid var(--line); }
.x { background: none; border: 0; color: var(--dim); font-size: 22px; cursor: pointer; line-height: 1; }
.x:hover { color: var(--text); }
.toast-box { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column;
  gap: 8px; z-index: 120; }
.toast { background: #122033; border: 1px solid #2a4160; border-left: 3px solid var(--accent);
  padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 12.8px;
  min-width: 210px; animation: slide .18s ease; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; } }

/* ---------------- 提示块 ---------------- */
.notice { display: flex; gap: 10px; padding: 11px 13px; border-radius: 9px; font-size: 12.5px;
  border: 1px solid #1e4f8a; background: #0e2035; color: #b9dcff; margin-bottom: 14px; }
.notice.warn { border-color: #7c5a12; background: #241d09; color: #fde68a; }
.notice.err { border-color: #7f2334; background: #2a1118; color: #fecdd3; }
.copyline { display: flex; gap: 8px; align-items: center; }
.copyline .inp { font-family: var(--mono); font-size: 12px; }
.codes { display: grid; gap: 6px; max-height: 330px; overflow: auto; padding: 2px; }
.codes code { background: #0a121e; border: 1px solid var(--line2); border-radius: 6px;
  padding: 7px 10px; font-family: var(--mono); font-size: 12.5px; color: #a5e3ff;
  display: flex; justify-content: space-between; }
.codes code span { color: var(--dim); cursor: pointer; }
.codes code span:hover { color: #fff; }

/* ---------------- 登录 ---------------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-body::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(700px 400px at 50% 0%, rgba(37, 99, 235, .18), transparent 70%); }
.login-card { position: relative; width: min(400px, 94vw); background: rgba(16, 26, 41, .93);
  border: 1px solid #29405d; border-radius: 16px; padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.login-card .brand { padding-bottom: 18px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: var(--dim); font-size: 12.5px; margin-bottom: 20px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; padding: 10px; margin-top: 4px; }
.alert { padding: 9px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 14px;
  background: #2a1118; border: 1px solid #7f2334; color: #fecdd3; }
.login-foot { margin: 18px 0 0; text-align: center; color: var(--dim); font-size: 11px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; flex-direction: row;
    flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 6px; }
  .brand { padding: 0 12px 0 2px; }
  .brand small { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; margin: 0; }
  .nav a { padding: 7px 10px; font-size: 12.5px; }
  .nav a.on { box-shadow: none; }
  .side-foot { display: none; }
  .main { padding: 16px 14px 50px; }
  .topbar { flex-wrap: wrap; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
}

/* 客户门户：卡密信息行 */
.license-box{display:grid;gap:7px}
.license-box .row{display:flex;justify-content:space-between;gap:12px;font-size:12.5px}
.license-box .k{color:var(--dim)}
.license-box .v{color:var(--muted);text-align:right}
.license-box .v.hi{color:#7dd3fc;font-family:var(--mono)}
