/* 仙宫云抢卡神器 · 凤希AI 友情提供 —— 独立样式，不碰控制台/管理台的 css */
.g-app { max-width: 1240px; margin: 0 auto; padding: 20px 22px 40px; color: #23303f; }
body.transparent { background: #f4f6fa; }

/* 顶部 */
.g-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.g-top h1 { font-size: 21px; font-weight: 700; color: #16283d; line-height: 1.25; }
.g-logo { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#ffb648,#ff7a45); color: #fff; font-size: 21px; box-shadow: 0 4px 12px rgba(255,140,60,.28); }
.g-sub { font-size: 12px; color: #7b8998; margin-top: 2px; }
.g-sp { flex: 1; }
.g-tstate { font-size: 12px; color: #5b6b7c; background: #fff; border: 1px solid #e3e9f1; border-radius: 20px; padding: 6px 12px; }
.g-tstate i { margin-right: 4px; }
.g-tstate.ok { color: #137a4e; border-color: #bfe8d2; background: #f1fcf6; }
.g-tstate.no { color: #b26a00; border-color: #f3dcae; background: #fffaf0; }

/* 说明条 */
.g-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.7; color: #5a6a7a;
  background: #eef4ff; border: 1px solid #d7e4fb; border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; }
.g-note > i { font-size: 15px; color: #3d6fd0; margin-top: 2px; }
.g-note b { color: #2c5bb5; }
.g-hostwarn { display: block; margin-top: 4px; color: #b4520f; font-weight: 600; }
.g-mode { display: block; margin-top: 6px; font-size: 12px; color: #2f7d5b; font-weight: 600; }

/* 网页模式下载引导条（软件内由 JS 隐藏） */
.g-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px;
  background: linear-gradient(96deg, #edf3ff, #f8fbff); border: 1px solid #d6e3fa; border-radius: 10px; }
.g-cta[hidden] { display: none; }
.g-cta > i { font-size: 22px; color: #3d6fd0; }
.g-cta-txt { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.65; color: #4c5d6f; }
.g-cta-txt > b { display: block; color: #23406e; font-size: 13px; margin-bottom: 2px; }
.g-cta-txt span b { color: #2c5bb5; }
.g-cta .g-btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .g-cta { flex-wrap: wrap; }
  .g-cta .g-btn { width: 100%; justify-content: center; }
}
/* 顶栏加了「新手教程」之后按钮变多：窄屏先收副标题，别让整排折成两行把说明条顶下去 */
@media (max-width: 860px) { .g-top .g-sub { display: none; } }
.g-mode i { margin-right: 3px; }

/* 两栏 */
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 940px) { .g-grid { grid-template-columns: 1fr; } }

/* 卡片 */
.g-card { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(30,50,80,.04); }
.g-chead { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #eef1f5; background: #fbfcfe; }
.g-ct { font-size: 14.5px; font-weight: 700; color: #1f3247; }
.g-ct i { color: #ff8a45; margin-right: 6px; }
.g-tag { font-size: 11px; color: #3d6fd0; background: #eaf1ff; border-radius: 20px; padding: 3px 9px; }
.g-cbody { padding: 16px; }

/* 表单 */
.g-field { margin-bottom: 13px; }
.g-field > label, .g-field > div > label { display: block; font-size: 12.5px; color: #4c5d6f; margin-bottom: 5px; font-weight: 600; }
.g-field input, .g-field select { width: 100%; height: 36px; padding: 0 10px; font-size: 13px; color: #23303f;
  border: 1px solid #d8e0ea; border-radius: 7px; background: #fff; outline: none; }
.g-field input:focus, .g-field select:focus { border-color: #6f9be0; box-shadow: 0 0 0 3px rgba(90,140,220,.13); }
.g-field select { appearance: auto; }
.g-row { display: flex; gap: 8px; align-items: center; }
.g-row input { flex: 1; }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-tip { font-size: 11.5px; color: #8a97a5; margin-top: 5px; line-height: 1.55; }
.g-tip-block { margin: -4px 0 12px; }
.g-link { color: #3d6fd0; margin-left: 6px; white-space: nowrap; }
.g-act { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.g-hint { font-size: 12px; color: #8a97a5; }

/* 按钮 */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px;
  font-size: 12.5px; border-radius: 7px; border: 1px solid #d8e0ea; background: #fff; color: #33455a; cursor: pointer; white-space: nowrap; }
.g-btn:hover { border-color: #a9c0df; background: #fafcff; }
.g-btn.sm { height: 29px; padding: 0 10px; font-size: 11.5px; }
.g-btn.primary { background: linear-gradient(135deg,#4c83e8,#3d6fd0); border-color: #3d6fd0; color: #fff; font-weight: 600; padding: 0 18px; height: 38px; }
.g-btn.primary:hover { filter: brightness(1.06); }
.g-btn.danger { color: #c0392b; border-color: #f0c9c4; }
.g-btn.danger:hover:not(:disabled) { background: #fff5f4; }
.g-btn.sec { color: #3d6fd0; border-color: #cfe0fa; background: #f5f9ff; }
.g-btn.ghost { background: #fff; }
.g-btn:disabled { opacity: .5; cursor: not-allowed; }
.g-btn i { font-size: 13px; }

/* 实例列表 */
.g-list { margin-top: 12px; border-top: 1px solid #eef1f5; }
.g-inst { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #f1f3f7; }
.g-inst:last-child { border-bottom: 0; }
/* 从管理台实例列表「抢卡开机」跳过来时，把这台机器标出来 */
.g-inst.sel { background: #f2f7ff; border-radius: 8px; box-shadow: inset 3px 0 0 #3d6fd0; padding-left: 9px; }
.g-inst.sel .g-inst-name { color: #1f4e9c; }
.g-inst-main { flex: 1; min-width: 0; }
.g-inst-name { font-size: 13px; font-weight: 600; color: #24364b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-inst-meta { font-size: 11px; color: #8a97a5; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-inst-meta code { font-family: Consolas, monospace; background: #f3f6fa; padding: 1px 4px; border-radius: 3px; }
.g-badge { font-size: 10.5px; border-radius: 20px; padding: 2px 8px; flex: none; }
.g-badge.run { color: #137a4e; background: #e7f8ef; }
.g-badge.off { color: #7a8899; background: #eef1f5; }
.g-badge.busy { color: #b26a00; background: #fff4de; }

/* 实例行里的直达入口（极简画布 / ComfyUI）：开机后是真链接，关机/开机中是灰的 span */
.g-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.g-lk { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; font-size: 11.5px;
  border: 1px solid #cfe0fa; border-radius: 6px; background: #f5f9ff; color: #2c5bb5; text-decoration: none; white-space: nowrap; }
.g-lk:hover { background: #eaf2ff; border-color: #a9c8f4; }
.g-lk i { font-size: 12px; }
.g-lk.dis { color: #9aa7b4; background: #f7f9fc; border-color: #e6ebf2; cursor: not-allowed; }
.g-lk.dis:hover { background: #f7f9fc; border-color: #e6ebf2; }

.g-empty { padding: 30px 10px; text-align: center; color: #9aa7b4; font-size: 12.5px; }
.g-empty i { display: block; font-size: 22px; margin-bottom: 8px; color: #c4cfda; }

/* 抢卡现场 */
.g-run { margin-top: 16px; }
.g-status { font-size: 11.5px; border-radius: 20px; padding: 3px 10px; font-weight: 600; }
.g-status.idle { color: #7a8899; background: #eef1f5; }
.g-status.work { color: #b26a00; background: #fff4de; }
.g-status.ok { color: #137a4e; background: #e7f8ef; }
.g-status.err { color: #c0392b; background: #fdecea; }
.g-stat { font-size: 11.5px; color: #8a97a5; }
.g-stat b { color: #34475c; font-size: 12.5px; }
.g-log { height: 220px; overflow-y: auto; padding: 10px 16px; background: #fbfcfe; font-family: Consolas, 'Courier New', monospace; font-size: 12px; line-height: 1.85; }
.g-line { color: #5b6b7c; }
.g-line.warn { color: #b26a00; }
.g-line.ok { color: #137a4e; font-weight: 600; }
.g-line.err { color: #c0392b; font-weight: 600; }
.g-line .ts { color: #a8b4c0; margin-right: 8px; }
.g-foot { text-align: center; font-size: 11.5px; color: #9aa7b4; margin-top: 18px; }
.g-foot a { color: #3d6fd0; }

/* 令牌弹窗 */
.g-mask { position: fixed; inset: 0; background: rgba(20,32,48,.42); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.g-mask.show { display: flex; }
.g-modal { width: 100%; max-width: 540px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 50px rgba(10,25,45,.24); }
.g-mhead { padding: 15px 18px; font-size: 15px; font-weight: 700; color: #1f3247; border-bottom: 1px solid #eef1f5; background: #fbfcfe; }
.g-mhead i { color: #3d6fd0; margin-right: 6px; }
.g-mbody { padding: 18px; }
.g-mfoot { display: flex; gap: 10px; justify-content: flex-end; padding: 13px 18px; border-top: 1px solid #eef1f5; background: #fbfcfe; }
.masked { -webkit-text-security: disc; }
