:root {
  --ink: #17253b;
  --muted: #738097;
  --blue: #3d70d6;
  --blue-deep: #2456bf;
  --blue-soft: #edf3ff;
  --line: #e7ebf2;
  --panel: #ffffff;
  --canvas: #f6f8fc;
  --green: #27a673;
  --orange: #d88639;
  --shadow: 0 18px 55px rgba(37, 65, 112, 0.1);
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { min-width: 320px; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; transform: none !important; box-shadow: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: #f7f9fd;
}
.login-shell::before, .login-shell::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.login-shell::before { top: -280px; left: -170px; background: rgba(70, 119, 221, .11); }
.login-shell::after { bottom: -330px; right: -180px; background: rgba(255, 194, 101, .12); }
.login-card {
  width: min(1080px, calc(100% - 48px));
  min-height: 630px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(44, 72, 122, .14);
  position: relative;
  z-index: 1;
}
.login-art {
  padding: 44px 48px;
  color: #fff;
  background: linear-gradient(148deg, #244fae 0%, #3d70d6 46%, #6f96e3 100%);
  position: relative;
  overflow: hidden;
}
.login-art::after {
  content: "";
  width: 470px; height: 470px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  position: absolute; right: -160px; bottom: -180px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 800;
  background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-name { font-size: 17px; letter-spacing: .01em; font-weight: 800; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; opacity: .72; }
.art-copy { position: relative; z-index: 2; margin-top: 122px; max-width: 420px; }
.art-copy h1 { margin: 15px 0 18px; font-size: clamp(32px, 4vw, 50px); line-height: 1.12; letter-spacing: -.055em; }
.art-copy p { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.8; }
.art-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; position: relative; z-index: 2; }
.art-pill { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); border-radius: 999px; padding: 9px 14px; font-size: 12px; color: rgba(255,255,255,.9); }
.login-form-wrap { display: flex; align-items: center; padding: 48px 70px; }
.login-form { width: 100%; max-width: 340px; margin: 0 auto; }
.login-form h2 { margin: 0 0 9px; font-size: 28px; letter-spacing: -.04em; }
.login-form .subcopy { margin: 0 0 35px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; margin-bottom: 8px; color: #4f5d73; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 0 14px; border: 1px solid #dfe5ef; outline: none; border-radius: 10px; background: #fbfcfe; color: var(--ink); font-size: 14px; transition: .2s; }
.field input, .field select { height: 47px; }
.field textarea { padding-top: 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,112,214,.12); background: #fff; }
.field label span { color: #9ca7b8; font-weight: 500; }
.field-help { margin: 7px 2px 0; color: #98a3b4; font-size: 10px; line-height: 1.55; }
.password-input { position: relative; }
.password-input input { padding-right: 45px; }
.toggle-password { position: absolute; right: 0; top: 0; height: 47px; width: 43px; border: 0; background: transparent; color: #9aa5b7; font-size: 16px; }
.form-error { height: 17px; color: #d65757; font-size: 12px; margin: -3px 0 9px; }
.primary-btn { width: 100%; height: 48px; border: 0; border-radius: 10px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #3f73db, #2d5dc5); box-shadow: 0 8px 17px rgba(61,112,214,.22); transition: .2s; }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 20px rgba(61,112,214,.3); }
.login-footnote { margin-top: 22px; color: #a0aabd; text-align: center; font-size: 11px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 245px; display: flex; flex-direction: column; flex-shrink: 0; padding: 26px 16px; color: #d9e4fc; background: #182b4d; }
.sidebar .brand-lockup { padding: 0 11px; }
.sidebar .brand-mark { background: #386bcf; border-color: #4b7bdb; }
.sidebar .brand-name { color: #fff; }
.workspace-label { margin: 53px 12px 13px; color: #8498bf; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 0; border-radius: 9px; color: #aebddd; background: transparent; font-size: 13px; text-align: left; transition: .2s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { color: #fff; background: rgba(76, 126, 220, .33); box-shadow: inset 3px 0 #74a0ff; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; opacity: .95; }
.sidebar-bottom { margin-top: auto; }
.api-status { margin: 0 6px 14px; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.04); }
.api-status-title { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #dbe7ff; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55d39a; box-shadow: 0 0 0 4px rgba(85,211,154,.12); }
.api-status p { margin: 8px 0 0; color: #8295ba; font-size: 10px; line-height: 1.55; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.09); }
.avatar { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: #e8efff; color: var(--blue-deep); font-size: 11px; font-weight: 800; }
.sidebar-user .user-name { color: #e2e9f9; font-size: 12px; font-weight: 700; }
.sidebar-user .user-role { color: #8fa2c7; font-size: 10px; margin-top: 3px; }
.logout-button { margin-left: auto; padding: 4px; border: 0; background: transparent; color: #94a8ce; font-size: 14px; }
.logout-button:hover { color: #fff; }
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.76); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: #8b97a9; font-size: 12px; }
.breadcrumbs strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 18px; }
.environment { display: flex; align-items: center; gap: 8px; color: #6d7b90; font-size: 11px; }
.env-dot { width: 7px; height: 7px; background: #42bc82; border-radius: 50%; }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #7c899d; font-size: 17px; }
.icon-button:hover { color: var(--blue); background: var(--blue-soft); }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 41px 42px 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-size: 29px; letter-spacing: -.05em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.secondary-btn, .outline-btn { height: 39px; padding: 0 15px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.secondary-btn { border: 1px solid #dce4f4; color: #406cc3; background: #f5f8ff; }
.outline-btn { border: 1px solid #dfe5ee; color: #647289; background: #fff; }
.secondary-btn:hover, .outline-btn:hover { border-color: #b8caeb; background: #edf3ff; }
.add-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-size: 12px; font-weight: 700; box-shadow: 0 7px 15px rgba(61,112,214,.2); }
.add-btn:hover { background: var(--blue-deep); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.summary-card { padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.summary-label { display: flex; align-items: center; justify-content: space-between; color: #8792a4; font-size: 11px; font-weight: 700; }
.summary-value { margin-top: 10px; font-size: 25px; letter-spacing: -.04em; font-weight: 800; }
.summary-trend { color: var(--green); font-size: 10px; font-weight: 700; }
.data-panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgba(30, 54, 96, .025); overflow: hidden; }
.panel-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; }
.count-badge { padding: 4px 8px; border-radius: 999px; color: #5271aa; background: #eef3fd; font-size: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; width: 210px; height: 33px; padding: 0 11px; border: 1px solid #e2e7ef; border-radius: 7px; color: #9aa4b4; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.table-wrap { overflow-x: auto; }
.game-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.game-table th { height: 43px; padding: 0 16px; color: #8793a5; background: #fafbfc; font-size: 11px; text-align: left; font-weight: 700; white-space: nowrap; }
.game-table td { height: 71px; padding: 0 16px; border-top: 1px solid #f0f2f6; color: #46566d; font-size: 12px; white-space: nowrap; }
.game-table tr:hover td { background: #fbfcff; }
.serial { width: 65px; color: #9da7b6 !important; }
.game-name-cell { display: flex; align-items: center; gap: 11px; }
.game-icon { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border-radius: 9px; color: #fff; background: linear-gradient(140deg, #f4bd70, #e8924a); font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.game-name { color: var(--ink); font-weight: 700; }
.game-meta { margin-top: 3px; color: #9ca7b7; font-size: 10px; }
.mono { font-family: "DM Mono", monospace; color: #59687e !important; font-size: 11px !important; }
.secret-cell { display: flex; align-items: center; gap: 7px; }
.eye { border: 0; padding: 3px; background: transparent; color: #9da7b8; font-size: 13px; }
.db-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 11px; font-weight: 700; }
.db-status .status-dot { width: 6px; height: 6px; box-shadow: none; }
.db-status.status-disabled { color: #a3aab7; }
.db-status.status-disabled .status-dot { background: #aab2bf; }
.table-subtext { margin-top: 4px; color: #9ca7b7; font-size: 9px; }
.endpoint-inline { max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: #5571a2 !important; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.enter-btn { height: 31px; padding: 0 12px; border: 1px solid #d6e2fa; border-radius: 7px; color: #3f6ecb; background: #f3f7ff; font-size: 11px; font-weight: 700; }
.enter-btn:hover { background: #e8f0ff; }
.more-btn { width: 27px; height: 27px; border: 0; border-radius: 6px; color: #94a0b1; background: transparent; }
.more-btn:hover { background: #f1f4f8; }
.empty-row { padding: 36px !important; text-align: center; color: #9aa5b4 !important; }
.page-footer { margin-top: 17px; display: flex; justify-content: space-between; color: #9ba5b5; font-size: 10px; }

.detail-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; border: 0; padding: 0; color: #6e7e98; background: transparent; font-size: 12px; }
.detail-back:hover { color: var(--blue); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.detail-title { display: flex; align-items: center; gap: 13px; }
.detail-title .game-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 22px; }
.detail-title h1 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.detail-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; align-items: center; gap: 9px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 23px; }
.metric-card { padding: 17px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.metric-card .metric-label { color: #8c98a8; font-size: 10px; font-weight: 700; }
.metric-card .metric-value { margin-top: 8px; color: var(--ink); font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.metric-card .metric-change { margin-top: 4px; color: var(--green); font-size: 10px; }
.db-layout { display: grid; grid-template-columns: 1fr 325px; gap: 18px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; padding: 18px; }
.collection-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; transition: .2s; cursor: pointer; }
.collection-card:hover, .collection-card.selected { border-color: #b8cdf8; background: #f8faff; }
.collection-card.selected { box-shadow: inset 0 0 0 1px #c7d8fb; }
.collection-top { display: flex; justify-content: space-between; align-items: flex-start; }
.collection-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #4a75cf; background: #eaf1ff; font-size: 14px; }
.collection-count { color: #a1acbc; font: 10px "DM Mono", monospace; }
.collection-card h3 { margin: 14px 0 4px; font-size: 13px; }
.collection-card p { margin: 0; color: #8f9aab; font-size: 10px; line-height: 1.6; }
.collection-permission { display: inline-flex; margin-top: 11px; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.collection-permission.can-write { color: #2b9168; background: #eaf8f2; }
.collection-permission.read-only { color: #8a739f; background: #f2edf7; }
.records-panel { border-top: 1px solid var(--line); }
.records-panel .panel-toolbar { padding: 0 18px; }
.record-table { width: 100%; border-collapse: collapse; }
.record-table th, .record-table td { padding: 12px 18px; border-top: 1px solid #f0f2f6; text-align: left; font-size: 11px; }
.record-table th { color: #8894a6; font-weight: 700; }
.record-table td { color: #5c6a7e; }
.record-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border-radius: 7px; color: #5274bf; background: #ebf1ff; font-size: 9px; font-weight: 800; vertical-align: middle; }
.record-json { max-width: 360px; overflow: hidden; color: #718097 !important; font: 10px "DM Mono", monospace !important; text-overflow: ellipsis; white-space: nowrap; }
.record-json-block { max-width: 560px; max-height: 170px; margin: 0; padding: 10px; overflow: auto; border-radius: 7px; color: #577092; background: #f7f9fc; font: 10px/1.6 "DM Mono", monospace; white-space: pre-wrap; }
.full-record-table td { vertical-align: top; }
.empty-inline { min-height: 190px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 35px; color: #9ca7b7; text-align: center; }
.empty-inline-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #6c8ac4; background: #edf3ff; font-size: 18px; }
.empty-inline strong { color: #65728a; font-size: 12px; }
.empty-inline span { font-size: 10px; }
.side-stack { display: grid; gap: 14px; align-content: start; }
.side-card { padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.side-card h3 { margin: 0; font-size: 13px; }
.side-card .side-caption { margin: 6px 0 15px; color: #8b97a8; font-size: 10px; line-height: 1.5; }
.code-block { padding: 13px; overflow-x: auto; border-radius: 8px; background: #1a2944; color: #bdd0f6; font: 10px/1.7 "DM Mono", monospace; }
.code-block .token { color: #81b1ff; }
.code-block .string { color: #f2c783; }
.quick-link { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid #eef1f5; color: #5b6d88; font-size: 11px; }
.quick-link:first-of-type { border-top: 0; }
.quick-link span:last-child { color: #a1adbd; }
.quick-link { cursor: pointer; }
.project-strip { display: flex; align-items: center; gap: 12px; padding: 14px 17px; margin-bottom: 17px; border: 1px solid #dfe6f2; border-radius: 12px; background: #fff; }
.project-strip > div:nth-child(2) { display: grid; gap: 5px; }
.project-strip strong { font-size: 13px; }
.project-strip .mono { color: #7d8ba1 !important; font-size: 10px !important; }
.project-strip .count-badge { margin-left: auto; }
.model-table, .log-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.model-table th, .log-table th { height: 43px; padding: 0 16px; color: #8793a5; background: #fafbfc; font-size: 10px; text-align: left; font-weight: 700; }
.model-table td, .log-table td { padding: 14px 16px; border-top: 1px solid #f0f2f6; color: #59697f; font-size: 11px; }
.model-name { display: flex; align-items: center; gap: 9px; }
.model-name .collection-icon { width: 29px; height: 29px; }
.model-name > div { display: grid; gap: 4px; }
.model-name strong { color: var(--ink); }
.model-name .mono { color: #8c99ac !important; font-size: 9px !important; }
.permission-tag { display: inline-flex; padding: 5px 8px; border-radius: 6px; font-size: 9px; font-weight: 700; }
.permission-tag.write { color: #298a64; background: #eaf8f2; }
.permission-tag.read { color: #8a739f; background: #f1edf6; }
.mini-action { height: 28px; padding: 0 9px; border: 1px solid #dde4ef; border-radius: 6px; color: #5873a6; background: #fff; font-size: 10px; }
.mini-action:hover { background: #f4f7fc; }
.danger-text { color: #c55c5c; }
.compact-select { min-width: 150px; height: 33px; padding: 0 10px; border: 1px solid #e0e5ed; border-radius: 7px; outline: none; color: #637188; background: #fff; font-size: 10px; }
.log-actor { display: inline-flex; margin-right: 7px; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.log-actor.admin { color: #476eb8; background: #eaf1ff; }
.log-actor.player { color: #28885f; background: #eaf8f2; }
.log-actor.system { color: #8b729e; background: #f2edf7; }
.log-actor-id { color: #8b98a9 !important; font-size: 9px !important; }
.heading-mono { display: inline-block; margin-left: 7px; padding: 4px 7px; border-radius: 6px; color: #6680af; background: #edf3ff; font: 10px "DM Mono", monospace; vertical-align: middle; }
.record-filter { max-width: 330px; overflow: hidden; color: #8e9bad; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.settings-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.settings-card-top { display: flex; align-items: center; gap: 10px; }
.settings-card-top h3 { margin: 0; font-size: 12px; }
.settings-card-top p { margin: 4px 0 0; color: #909cac; font-size: 9px; }
.settings-icon { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border-radius: 9px; font-size: 10px; font-weight: 800; }
.settings-icon.green { color: #258a61; background: #e9f8f1; }
.settings-icon.blue { color: #4a6fb7; background: #eaf1ff; }
.settings-icon.orange { color: #b77634; background: #fff1df; }
.settings-value { margin-top: 18px; color: var(--ink); font-size: 20px; font-weight: 800; }
.settings-meta { margin-top: 5px; overflow: hidden; color: #94a0b1; font: 9px "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.system-info-panel { margin-bottom: 18px; }
.system-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.system-info-grid > div { display: grid; gap: 8px; padding: 18px 20px; border-top: 1px solid #eef1f5; border-right: 1px solid #eef1f5; }
.system-info-grid > div:nth-child(3n) { border-right: 0; }
.system-info-grid span { color: #8c98a9; font-size: 10px; }
.system-info-grid strong { color: #43536a; font-size: 13px; }
.settings-warning { padding: 16px 18px; border: 1px solid #f0dfbf; border-radius: 11px; color: #8b6c38; background: #fffaf0; }
.settings-warning strong { font-size: 11px; }
.settings-warning p { margin: 5px 0 0; color: #9d845e; font-size: 10px; line-height: 1.6; }

.api-docs-content { max-width: 1180px; }
.api-project-bar { display: flex; align-items: center; gap: 13px; min-height: 76px; padding: 14px 17px; margin-bottom: 16px; border: 1px solid #dce6f8; border-radius: 12px; background: linear-gradient(100deg, #f6f9ff, #fff); }
.api-project-icon { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; border-radius: 11px; color: #fff; background: linear-gradient(140deg, #f4bd70, #e8924a); font-size: 18px; font-weight: 800; }
.api-project-name { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14px; font-weight: 800; }
.api-base-url { margin-top: 6px; color: #6f83a8 !important; font-size: 11px !important; }
.api-project-bar .secondary-btn { margin-left: auto; }
.api-note { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; margin-bottom: 19px; border: 1px solid #f2e4c7; border-radius: 10px; color: #876d40; background: #fffaf0; }
.note-icon { width: 19px; height: 19px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; color: #fff; background: #dca34a; font-size: 11px; font-weight: 800; }
.api-note strong { display: block; font-size: 11px; }
.api-note p { margin: 4px 0 0; color: #99805a; font-size: 11px; line-height: 1.6; }
.api-doc-list { display: grid; gap: 15px; }
.api-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 20px rgba(30,54,96,.025); }
.api-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.api-card-title-wrap { display: flex; align-items: flex-start; gap: 11px; }
.method-badge { display: inline-grid; place-items: center; min-width: 49px; height: 23px; border-radius: 5px; color: #3972d6; background: #eaf1ff; font: 700 10px "DM Mono", monospace; }
.api-card h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.api-card-header p { margin: 5px 0 0; color: #8d99aa; font-size: 11px; line-height: 1.5; }
.api-endpoint { padding: 10px 12px; margin-top: 17px; overflow-x: auto; border: 1px solid #edf0f5; border-radius: 7px; color: #4f6386 !important; background: #fafbfd; font-size: 11px !important; }
.api-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 14px; }
.api-code-label { margin-bottom: 7px; color: #8a96a8; font-size: 10px; font-weight: 800; }
.api-code { min-height: 142px; margin: 0; padding: 13px; overflow: auto; border-radius: 8px; color: #bfd1f4; background: #192945; font: 10px/1.65 "DM Mono", monospace; white-space: pre-wrap; }
.response-code { color: #b8e4d1; background: #1b2f34; }
.collection-docs-section { margin-top: 22px; }
.collection-docs-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 15px; }
.docs-eyebrow { display: block; margin-bottom: 6px; color: #7890bd; font: 800 9px "DM Mono", monospace; letter-spacing: .16em; }
.collection-docs-heading h2 { margin: 0; font-size: 19px; }
.collection-docs-heading p { margin: 6px 0 0; color: #8d99aa; font-size: 11px; }
.collection-doc-index { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 14px; border: 1px solid #e3e9f3; border-radius: 11px; background: #f9fbfe; }
.collection-doc-chip { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid #dfe6f2; border-radius: 8px; color: #64738a; background: #fff; font-size: 10px; }
.collection-doc-chip:hover, .collection-doc-chip.active { border-color: #9eb9ed; color: #315fae; background: #eff5ff; }
.collection-doc-chip span { color: #4f79ca; }
.collection-doc-chip code { color: #96a2b5; font: 9px "DM Mono", monospace; }
.collection-doc-list { display: grid; gap: 15px; }
.collection-api-card { padding: 19px; scroll-margin-top: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 20px rgba(30,54,96,.025); }
.collection-api-card.selected { border-color: #b9cdf3; box-shadow: 0 8px 28px rgba(64,105,180,.09); }
.collection-api-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid #eef1f5; }
.collection-api-identity { display: flex; align-items: flex-start; gap: 11px; }
.collection-api-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.collection-api-title h3 { margin: 0; font-size: 15px; }
.collection-api-title code { padding: 3px 6px; border-radius: 5px; color: #6179a5; background: #f0f4fb; font: 9px "DM Mono", monospace; }
.collection-api-identity p { margin: 6px 0 0; color: #8c98aa; font-size: 10px; line-height: 1.55; }
.collection-operation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 15px; }
.collection-operation { min-width: 0; padding: 14px; border: 1px solid #e6eaf1; border-radius: 10px; background: #fcfdff; }
.collection-operation.disabled { border-style: dashed; background: #fafafa; }
.collection-operation-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.collection-operation-header > div { display: flex; align-items: center; gap: 8px; }
.collection-operation-header strong { font-size: 11px; }
.collection-operation-header .outline-btn { height: 30px; padding: 0 9px; font-size: 9px; }
.collection-operation .api-endpoint { margin-top: 12px; }
.collection-operation .api-code-label { margin-top: 12px; }
.collection-operation .api-code { min-height: 164px; }
.collection-operation .response-label { margin-top: 12px; }
.collection-operation .response-code { min-height: 132px; }
.collection-doc-empty { margin-top: 0; }
.empty-state { padding: 70px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: center; }
.empty-state h2 { margin: 0; font-size: 19px; }
.empty-state p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.empty-state-btn { margin: 20px auto 0; }
.playground-card { padding: 21px; margin-top: 20px; border: 1px solid #dbe5f7; border-radius: 14px; background: linear-gradient(145deg, #fbfdff, #f5f8ff); }
.playground-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.playground-heading h2 { margin: 0; font-size: 16px; }
.playground-heading p { margin: 5px 0 0; color: #8d99aa; font-size: 10px; }
.dev-badge { padding: 5px 8px; border-radius: 6px; color: #98662c; background: #fff0d9; font-size: 9px; font-weight: 800; }
.playground-grid { display: grid; grid-template-columns: 390px 1fr; gap: 16px; }
.playground-form { padding: 17px; border: 1px solid #e3e8f2; border-radius: 11px; background: #fff; }
.playground-form .field { margin-bottom: 13px; }
.playground-form .field input { height: 39px; font-size: 11px; }
.playground-form .field textarea { font: 10px/1.6 "DM Mono", monospace; }
.wide-btn { width: 100%; }
.token-preview { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 15px; padding: 9px 10px; border-radius: 7px; color: #8b98a9; background: #f7f9fc; font-size: 9px; }
.token-preview code { color: #5571a3; font: 9px "DM Mono", monospace; }
.playground-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.playground-output { min-width: 0; }
.playground-output .api-code { min-height: 100%; }
.checkbox-field { display: flex; align-items: center; gap: 8px; color: #5d6c81; font-size: 11px; cursor: pointer; }
.checkbox-field input { accent-color: var(--blue); }
.danger-btn { height: 38px; padding: 0 14px; border: 1px solid #efcaca; border-radius: 8px; color: #be4d4d; background: #fff5f5; font-size: 11px; font-weight: 700; }
.danger-btn:hover { color: #fff; background: #c95757; }
.modal-footer-spacer { flex: 1; }
.confirm-modal .modal-body { text-align: center; }
.confirm-icon { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: #c45050; background: #fff0f0; font-size: 20px; font-weight: 800; }
.confirm-modal h3 { margin: 0; font-size: 15px; }
.confirm-modal .modal-body p { margin: 9px auto 0; max-width: 350px; color: #8c98a9; font-size: 10px; line-height: 1.7; }
.project-picker-list { display: grid; gap: 8px; }
.project-picker-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e2e7ef; border-radius: 9px; color: #5c6b80; background: #fff; text-align: left; }
.project-picker-item:hover, .project-picker-item.selected { border-color: #b9cdf3; background: #f5f8ff; }
.project-picker-item > span:nth-child(2) { display: grid; gap: 4px; flex: 1; }
.project-picker-item strong { color: var(--ink); font-size: 11px; }
.project-picker-item small { color: #8d99aa; font-size: 9px; }
.project-picker-item .game-icon { width: 31px; height: 31px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(16, 30, 55, .42); backdrop-filter: blur(3px); }
.modal { width: min(470px, 100%); border-radius: 16px; background: #fff; box-shadow: 0 25px 70px rgba(16,30,55,.25); overflow: hidden; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(7px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 16px; }
.close-modal { border: 0; padding: 4px; color: #8b98aa; background: transparent; font-size: 19px; }
.modal-body { padding: 21px 22px 24px; }
.modal-body .field { margin-bottom: 15px; }
.modal-body .field input { height: 42px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }
.modal-footer .primary-btn { width: auto; height: 38px; padding: 0 19px; font-size: 12px; }
.modal-footer .outline-btn { height: 38px; }

#toast-root { position: fixed; right: 25px; bottom: 24px; z-index: 30; display: grid; gap: 9px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border: 1px solid #d5e8df; border-radius: 9px; color: #286e51; background: #f2fbf7; box-shadow: 0 10px 28px rgba(34, 85, 63, .13); font-size: 12px; animation: toast-in .2s ease-out; }
.toast-error { border-color: #f0cccc; color: #ad4b4b; background: #fff5f5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .login-card { grid-template-columns: 1fr; max-width: 520px; min-height: unset; }
  .login-art { min-height: 300px; padding: 33px 36px; }
  .art-copy { margin-top: 60px; }
  .login-form-wrap { padding: 43px 40px; }
  .sidebar { width: 205px; }
  .content { padding: 32px 25px 55px; }
  .topbar { padding: 0 25px; }
  .db-layout { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, 1fr); }
  .api-code-grid { grid-template-columns: 1fr; }
  .collection-operation-grid { grid-template-columns: 1fr; }
  .playground-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .sidebar { display: none; }
  .topbar { height: 62px; }
  .content { padding: 27px 16px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .collection-docs-heading { align-items: flex-start; flex-direction: column; }
  .collection-api-header { flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .add-btn { margin-left: auto; }
  .summary-grid, .metric-grid { grid-template-columns: 1fr 1fr; }
  .summary-card:last-child, .metric-card:last-child { display: none; }
  .panel-toolbar { align-items: flex-start; flex-direction: column; gap: 11px; padding: 15px 16px; }
  .search-box { width: 100%; }
  .page-footer { display: none; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; flex-wrap: wrap; }
  .side-stack { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: 1fr; }
  .top-actions .environment { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .system-info-grid { grid-template-columns: 1fr 1fr; }
  .system-info-grid > div, .system-info-grid > div:nth-child(3n) { border-right: 1px solid #eef1f5; }
  .system-info-grid > div:nth-child(2n) { border-right: 0; }
}
@media (max-width: 450px) {
  .login-card { width: calc(100% - 24px); border-radius: 20px; }
  .login-art { padding: 27px 25px; }
  .art-copy h1 { font-size: 34px; }
  .login-form-wrap { padding: 37px 25px; }
  .summary-grid, .metric-grid { gap: 9px; }
  .summary-card, .metric-card { padding: 14px; }
  .api-project-bar { align-items: flex-start; flex-wrap: wrap; }
  .api-project-bar .secondary-btn { margin-left: 0; }
  .api-card-header { align-items: flex-start; flex-direction: column; }
}
