:root {
    --qg-navy: #0a1425;
    --qg-navy-2: #0f1e33;
    --qg-navy-3: #152843;
    --qg-mint: #1cc7ad;
    --qg-mint-deep: #0a8f7c;
    --qg-mint-soft: #e6faf5;
    --qg-amber: #f0a33c;
    --qg-amber-soft: #fff4e5;
    --qg-danger: #e14d55;
    --qg-danger-soft: #fff0f1;
    --qg-ink: #101828;
    --qg-sub: #475467;
    --qg-muted: #7c899b;
    --qg-paper: #f2f6fb;
    --qg-card: #ffffff;
    --qg-line: #e3eaf3;
    --qg-line-2: #eef3f9;
    --qg-radius: 18px;
    --qg-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 42px -28px rgba(16, 24, 40, .28);
    --qg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    --qg-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.qg {
    font-family: var(--qg-font);
    color: var(--qg-ink);
    background: var(--qg-paper);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.55;
}
body.qg::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(900px 480px at 76% -8%, rgba(28, 199, 173, .10), transparent 62%),
        radial-gradient(700px 420px at 6% 22%, rgba(15, 30, 51, .06), transparent 60%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; width: 18px; height: 18px; }
::selection { background: rgba(28, 199, 173, .23); }
:focus-visible { outline: 2px solid rgba(28, 199, 173, .75); outline-offset: 2px; border-radius: 6px; }
.qg-shell { min-height: 100vh; position: relative; z-index: 1; }

/* ---------- sidebar ---------- */
.qg-side {
    position: fixed; inset: 0 auto 0 0; width: 248px; padding: 26px 18px 18px;
    background:
        radial-gradient(420px 260px at 18% 0%, rgba(28, 199, 173, .15), transparent 60%),
        linear-gradient(168deg, #0b1729 0%, #0a1425 55%, #091322 100%);
    color: rgba(255, 255, 255, .72);
    display: flex; flex-direction: column; z-index: 40;
    border-right: 1px solid rgba(255, 255, 255, .06);
}
.qg-side::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
    background-image: radial-gradient(rgba(255, 255, 255, .11) 0.6px, transparent 0.6px);
    background-size: 7px 7px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 50%);
}
.qg-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; padding: 2px 8px 24px; }
.qg-brand-mark {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: linear-gradient(145deg, #2ee0c4, #0e9d89);
    color: #04211d; font-weight: 900; font-size: 14px; letter-spacing: -.5px;
    box-shadow: 0 12px 26px -12px rgba(28, 199, 173, .75), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.qg-brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qg-brand-text strong { color: #fff; font-size: 15px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qg-brand-text small { color: rgba(255, 255, 255, .38); font-size: 8.5px; letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; }
.qg-side-label {
    position: relative; z-index: 1; padding: 16px 12px 8px; font-size: 10px;
    letter-spacing: 1.8px; text-transform: uppercase; color: rgba(255, 255, 255, .27); font-weight: 600;
}
.qg-nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.qg-nav a {
    display: flex; align-items: center; gap: 11px; height: 43px; padding: 0 12px;
    border-radius: 11px; color: rgba(255, 255, 255, .60); font-size: 13.5px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.qg-nav a:hover { color: #fff; background: rgba(255, 255, 255, .055); transform: translateX(2px); }
.qg-nav a.on {
    color: #06251f; background: linear-gradient(135deg, #33ddc3, #16b8a2);
    font-weight: 700; box-shadow: 0 10px 22px -12px rgba(28, 199, 173, .65);
}
.qg-nav a.on .qg-ico { color: #06251f; }
.qg-ico { width: 17px; height: 17px; opacity: .95; flex: 0 0 auto; }
.qg-nav-dot { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #06332c; }
.qg-side-foot { margin-top: auto; position: relative; z-index: 1; padding-top: 22px; }
.qg-node {
    display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06);
}
.qg-node-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--qg-mint); box-shadow: 0 0 0 4px rgba(28, 199, 173, .13); flex: 0 0 auto; }
.qg-node div { display: flex; flex-direction: column; min-width: 0; }
.qg-node strong { color: rgba(255, 255, 255, .85); font-size: 11.5px; font-weight: 650; }
.qg-node small { color: rgba(255, 255, 255, .35); font-size: 9.5px; font-family: var(--qg-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qg-side-meta { display: flex; justify-content: space-between; padding: 13px 12px 0; color: rgba(255, 255, 255, .24); font-size: 10px; font-family: var(--qg-mono); }

/* ---------- main / top ---------- */
.qg-main { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.qg-top {
    height: 74px; padding: 0 34px; display: flex; align-items: center; gap: 18px;
    position: sticky; top: 0; z-index: 25; backdrop-filter: blur(14px);
    background: rgba(242, 246, 251, .82); border-bottom: 1px solid rgba(227, 234, 243, .8);
}
.qg-menu { display: none; background: #fff; border: 1px solid var(--qg-line); border-radius: 10px; width: 38px; height: 38px; place-items: center; }
.qg-crumb { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--qg-muted); }
.qg-crumb i { font-style: normal; color: #c4cedd; }
.qg-crumb strong { color: var(--qg-ink); font-size: 11.5px; letter-spacing: 1.1px; }
.qg-top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.qg-clock { font-family: var(--qg-mono); font-size: 12px; color: var(--qg-sub); letter-spacing: .5px; }
.qg-user { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 12px; transition: background .18s; }
.qg-user:hover { background: rgba(255, 255, 255, .8); }
.qg-avatar {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(145deg, #16263e, #0b1628); color: #d9fbf4; font-weight: 800; font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.qg-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.qg-user-meta strong { font-size: 12px; font-weight: 650; }
.qg-user-meta small { font-size: 10px; color: var(--qg-muted); }
.qg-logout-form { display: flex; }
.qg-icon-btn {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent;
    display: grid; place-items: center; color: var(--qg-sub); transition: all .18s;
}
.qg-icon-btn:hover { background: #fff; border-color: var(--qg-line); color: var(--qg-ink); }
.qg-content { width: 100%; max-width: 1360px; margin: 0 auto; padding: 34px 34px 54px; flex: 1; }
.qg-foot { display: flex; justify-content: space-between; gap: 16px; padding: 18px 34px 24px; color: #8b98aa; font-size: 10.5px; }

/* ---------- typography / buttons ---------- */
.qg-eyebrow { margin: 0 0 10px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--qg-mint-deep); font-weight: 750; }
.qg-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.qg-page-head h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; letter-spacing: -1px; font-weight: 800; }
.qg-lede { margin: 0; max-width: 660px; color: var(--qg-sub); font-size: 13px; line-height: 1.7; }
.qg-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-bottom: 3px; }
.qg-link { display: inline-flex; align-items: center; gap: 6px; color: var(--qg-mint-deep); font-size: 12px; font-weight: 650; }
.qg-link svg { width: 14px; height: 14px; transition: transform .18s; }
.qg-link:hover svg { transform: translateX(2px); }
.qg-muted { color: var(--qg-muted); font-size: 12px; }
.qg-mono { font-family: var(--qg-mono); font-size: 12px; letter-spacing: -.1px; }
.qg-nowrap { white-space: nowrap; }
.qg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
    border-radius: 11px; border: 1px solid transparent; font-size: 12.5px; font-weight: 650; white-space: nowrap;
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .18s;
}
.qg-btn svg { width: 16px; height: 16px; }
.qg-btn:hover { transform: translateY(-1px); }
.qg-btn-primary { background: var(--qg-navy); color: #fff; box-shadow: 0 12px 24px -14px rgba(10, 20, 37, .7); }
.qg-btn-primary:hover { background: var(--qg-navy-2); }
.qg-btn-ghost { background: #fff; border-color: var(--qg-line); color: var(--qg-sub); }
.qg-btn-ghost:hover { border-color: #cbd7e6; color: var(--qg-ink); }
.qg-btn-dark { background: #101828; color: #fff; }
.qg-btn-soft { background: var(--qg-mint-soft); color: #086b5e; border-color: #c3f2e9; }
.qg-btn-danger { background: var(--qg-danger-soft); color: #b32b33; border-color: #ffd2d5; }
.qg-btn-danger:hover { background: #ffe4e6; }
.qg-btn-mini { height: 29px; padding: 0 10px; border-radius: 8px; font-size: 11px; }
.qg-btn-block { width: 100%; }
.qg-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- stats ---------- */
.qg-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.qg-stat {
    background: var(--qg-card); border: 1px solid var(--qg-line); border-radius: var(--qg-radius);
    padding: 19px 20px 17px; box-shadow: var(--qg-shadow); position: relative; overflow: hidden;
    animation: qg-rise .5s ease both;
}
.qg-stat:nth-child(2) { animation-delay: .04s; } .qg-stat:nth-child(3) { animation-delay: .08s; } .qg-stat:nth-child(4) { animation-delay: .12s; }
.qg-stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--qg-sub); font-size: 11.5px; }
.qg-stat-ico { color: #9aa8ba; width: 19px; height: 19px; }
.qg-stat > strong { display: block; margin: 14px 0 2px; font-size: 34px; line-height: 1; letter-spacing: -1.4px; font-weight: 780; }
.qg-stat > small { display: block; color: var(--qg-muted); font-size: 10.5px; }
.qg-stat-line { position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--qg-mint); border-radius: 2px 2px 0 0; opacity: .8; }
.qg-stat-line.alt { background: #5b8def; } .qg-stat-line.warm { background: var(--qg-amber); } .qg-stat-line.bad { background: var(--qg-danger); } .qg-stat-line.ok { background: var(--qg-mint); }

/* ---------- panels ---------- */
.qg-grid-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.qg-span-2 { grid-column: span 2; }
.qg-panel {
    background: var(--qg-card); border: 1px solid var(--qg-line); border-radius: var(--qg-radius);
    box-shadow: var(--qg-shadow); padding: 22px 22px 20px; min-width: 0;
    animation: qg-rise .5s ease both;
}
.qg-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.qg-panel-head h2 { margin: 0; font-size: 16px; letter-spacing: -.3px; font-weight: 720; }
.qg-panel-head .qg-eyebrow { margin-bottom: 6px; }
.qg-panel-tools { align-items: center; }
.qg-panel-tools h2 { font-size: 15px; }
.qg-empty {
    padding: 36px 20px; text-align: center; color: var(--qg-muted); font-size: 12.5px;
    border: 1px dashed #d8e2ef; border-radius: 12px; background: #fafcff;
    display: flex; flex-direction: column; gap: 5px;
}
.qg-empty strong { color: var(--qg-sub); font-size: 13px; }

/* ---------- table ---------- */
.qg-table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.qg-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.qg-table th {
    text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
    color: #8d9aac; font-weight: 650; padding: 0 12px 10px; white-space: nowrap;
    border-bottom: 1px solid var(--qg-line-2);
}
.qg-table td { padding: 13px 12px; border-bottom: 1px solid var(--qg-line-2); font-size: 12.5px; vertical-align: middle; }
.qg-table tr:last-child td { border-bottom: 0; }
.qg-table tbody tr { transition: background .16s; }
.qg-table tbody tr:hover { background: #fbfdff; }
.qg-table td:first-child, .qg-table th:first-child { padding-left: 0; }
.qg-table td:last-child, .qg-table th:last-child { padding-right: 0; }
.qg-table td small { display: block; margin-top: 3px; color: var(--qg-muted); font-size: 10.5px; }
.qg-row-title { font-weight: 650; color: var(--qg-ink); }
.qg-row-title:hover { color: var(--qg-mint-deep); }
.qg-cell-action { width: 40px; text-align: right; }
.qg-cell-action .qg-icon-btn { width: 30px; height: 30px; }
.qg-table .qg-mono { font-size: 11.5px; }
.qg-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; color: var(--qg-muted); font-size: 11px; }
.qg-pager > div { display: flex; gap: 7px; }
.qg-pager .qg-btn { height: 32px; padding: 0 12px; font-size: 11px; }

/* ---------- pills / live ---------- */
.qg-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px;
    border-radius: 999px; font-size: 10.5px; font-weight: 650; white-space: nowrap;
    background: #f2f5f9; color: #58677b;
}
.qg-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.qg-pill.ok { background: var(--qg-mint-soft); color: #087465; }
.qg-pill.warn { background: var(--qg-amber-soft); color: #9a5b08; }
.qg-pill.bad { background: var(--qg-danger-soft); color: #b32b33; }
.qg-pill.muted { background: #f3f5f8; color: #7e8a9b; }
.qg-live { display: inline-flex; align-items: center; gap: 7px; color: var(--qg-muted); font-size: 10.5px; white-space: nowrap; }
.qg-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--qg-mint); box-shadow: 0 0 0 4px rgba(28, 199, 173, .12); }

/* ---------- dashboard bits ---------- */
.qg-spark { height: 142px; display: flex; align-items: flex-end; gap: 9px; padding: 8px 2px 0; }
.qg-spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.qg-spark-col span { font-size: 9px; color: var(--qg-muted); font-family: var(--qg-mono); }
.qg-spark-col i { width: 100%; max-width: 24px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, #16b8a2, #5ce6d0); min-height: 4px; animation: qg-grow .7s ease both; transform-origin: bottom; }
.qg-spark-col:last-child i { background: linear-gradient(to top, #0b8d7b, #21c9b1); }
.qg-spark-col small { font-size: 8px; color: #a2adbb; white-space: nowrap; }
.qg-spark-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--qg-line-2); margin-top: 12px; padding-top: 11px; color: var(--qg-muted); font-size: 10.5px; }
.qg-spark-foot a { color: var(--qg-mint-deep); font-weight: 650; }
.qg-quiet { display: flex; align-items: center; gap: 13px; padding: 18px 0 4px; }
.qg-quiet-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--qg-mint-soft); color: var(--qg-mint-deep); flex: 0 0 auto; }
.qg-quiet-mark svg { width: 17px; height: 17px; }
.qg-quiet div { display: flex; flex-direction: column; }
.qg-quiet strong { font-size: 12.5px; }
.qg-quiet small { color: var(--qg-muted); font-size: 10.5px; }
.qg-attention-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.qg-attention-list li + li { border-top: 1px solid var(--qg-line-2); }
.qg-attention-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; }
.qg-attention-list a:hover strong { color: var(--qg-mint-deep); }
.qg-attention-list a span { display: flex; flex-direction: column; min-width: 0; }
.qg-attention-list strong { font-size: 12px; }
.qg-attention-list small { color: var(--qg-muted); font-size: 10.5px; }
.qg-attention-list em { font-style: normal; font-size: 10.5px; color: #9a5b08; background: var(--qg-amber-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.qg-feed { display: flex; flex-direction: column; }
.qg-feed-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--qg-line-2); }
.qg-feed-row:last-child { border-bottom: 0; }
.qg-feed-mark { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto; }
.qg-feed-mark svg { width: 12px; height: 12px; }
.qg-feed-mark.ok { background: var(--qg-mint-soft); color: #0a8f7c; }
.qg-feed-mark.bad { background: var(--qg-danger-soft); color: #bd333b; }
.qg-feed-row > div { min-width: 0; display: flex; flex-direction: column; }
.qg-feed-row strong { font-size: 11px; font-family: var(--qg-mono); letter-spacing: -.1px; }
.qg-feed-row small { color: var(--qg-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qg-feed-row time { margin-left: auto; font-size: 10px; color: #9aa8ba; font-family: var(--qg-mono); }

/* ---------- filters ---------- */
.qg-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qg-filter select { height: 36px; border: 1px solid var(--qg-line); background: #fff; border-radius: 9px; padding: 0 28px 0 10px; font-size: 11.5px; color: var(--qg-sub); }
.qg-filter .qg-btn { height: 36px; padding: 0 13px; font-size: 11px; }
.qg-search { display: flex; align-items: center; gap: 7px; height: 36px; border: 1px solid var(--qg-line); border-radius: 9px; padding: 0 10px; background: #fff; color: #9aa8ba; }
.qg-search svg { width: 14px; height: 14px; }
.qg-search input { border: 0; outline: 0; width: 200px; background: transparent; font-size: 11.5px; color: var(--qg-ink); }
.qg-search input::placeholder { color: #aeb8c5; }
.qg-tabs { display: flex; gap: 6px; background: #f2f5f9; padding: 3px; border-radius: 10px; }
.qg-tabs a { padding: 7px 13px; border-radius: 8px; font-size: 11.5px; color: var(--qg-sub); }
.qg-tabs a.on { background: #fff; color: var(--qg-ink); font-weight: 650; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }

/* ---------- forms ---------- */
.qg-form { display: flex; flex-direction: column; gap: 14px; }
.qg-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.qg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qg-field > span { font-size: 11px; color: var(--qg-sub); font-weight: 600; }
.qg-field > span em { font-style: normal; color: #a3afbe; font-weight: 400; }
.qg-field input, .qg-field select, .qg-field textarea {
    width: 100%; height: 40px; border: 1px solid var(--qg-line); border-radius: 10px;
    background: #fbfdff; padding: 0 12px; font-size: 12.5px; outline: 0; color: var(--qg-ink);
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.qg-field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.qg-field input::placeholder, .qg-field textarea::placeholder { color: #b3bdc9; }
.qg-field input:focus, .qg-field select:focus, .qg-field textarea:focus {
    border-color: rgba(28, 199, 173, .65); background: #fff; box-shadow: 0 0 0 3px rgba(28, 199, 173, .11);
}
.qg-field small { color: var(--qg-muted); font-size: 10px; line-height: 1.5; }
.qg-field-wide { grid-column: 1 / -1; }
.qg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qg-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-top: 3px; }
.qg-form-panel { margin-bottom: 18px; }
.qg-note { margin-top: 15px; padding: 13px 14px; background: #f6faff; border: 1px solid #e5eef9; border-radius: 11px; }
.qg-note > span { display: block; font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #8aa0b8; margin-bottom: 4px; }
.qg-note p { margin: 0; color: var(--qg-sub); font-size: 11.5px; line-height: 1.65; }
.qg-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--qg-line); border-radius: 11px; background: #fbfdff; cursor: pointer; }
.qg-toggle input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--qg-mint-deep); }
.qg-toggle span { display: flex; flex-direction: column; gap: 2px; }
.qg-toggle strong { font-size: 12px; }
.qg-toggle small { color: var(--qg-muted); font-size: 10.5px; }
.qg-inline-form { display: none; padding: 11px; background: #fbfdff; border: 1px dashed #dbe5f1; border-radius: 10px; margin: -2px 0 6px; flex-direction: column; gap: 8px; }
.qg-inline-form.on { display: flex; }
.qg-inline-form input { height: 36px; border: 1px solid var(--qg-line); border-radius: 8px; padding: 0 10px; font-size: 11px; }

/* ---------- license detail ---------- */
.qg-detail-head { align-items: flex-start; }
.qg-back { display: inline-flex; align-items: center; gap: 5px; color: var(--qg-muted); font-size: 10.5px; margin-bottom: 15px; }
.qg-back svg { width: 13px; height: 13px; transform: rotate(180deg); }
.qg-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 16px; margin-bottom: 18px; }
.qg-stack { display: flex; flex-direction: column; gap: 16px; }
.qg-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--qg-line-2); }
.qg-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--qg-line-2); min-width: 0; }
.qg-facts > div:nth-child(odd) { padding-right: 18px; }
.qg-facts dt { color: var(--qg-muted); font-size: 10.5px; white-space: nowrap; }
.qg-facts dd { margin: 0; text-align: right; font-size: 11.5px; font-weight: 600; word-break: break-word; }
.qg-facts .qg-mono { font-size: 10.5px; font-weight: 500; }
.qg-action-list { display: flex; flex-direction: column; gap: 8px; }
.qg-sign-card { background: linear-gradient(160deg, #0c1b2f, #0a1425); border-color: transparent; color: rgba(255, 255, 255, .76); }
.qg-sign-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.qg-sign-head > span { width: 30px; height: 30px; border-radius: 9px; background: rgba(28, 199, 173, .14); color: var(--qg-mint); display: grid; place-items: center; }
.qg-sign-head > span svg { width: 15px; height: 15px; }
.qg-sign-head div { display: flex; flex-direction: column; }
.qg-sign-head strong { color: #fff; font-size: 12px; }
.qg-sign-head small { color: rgba(255, 255, 255, .42); font-size: 9.5px; font-family: var(--qg-mono); }
.qg-sign-card p { margin: 0 0 12px; color: rgba(255, 255, 255, .55); font-size: 10.5px; line-height: 1.6; }
.qg-sign-meta { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .09); font-size: 10px; color: rgba(255, 255, 255, .4); }
.qg-sign-meta strong { color: rgba(255, 255, 255, .82); font-weight: 600; }
.qg-key-reveal {
    background: linear-gradient(135deg, #0d1e32, #0a1425); color: #fff; border-radius: var(--qg-radius);
    padding: 22px; margin-bottom: 18px; position: relative; overflow: hidden;
    box-shadow: 0 30px 60px -42px rgba(10, 20, 37, .8);
}
.qg-key-reveal::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(28, 199, 173, .30), transparent 65%); }
.qg-key-reveal-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.qg-key-mark { width: 36px; height: 36px; border-radius: 11px; background: rgba(28, 199, 173, .16); color: var(--qg-mint); display: grid; place-items: center; flex: 0 0 auto; }
.qg-key-reveal-head div { display: flex; flex-direction: column; gap: 2px; }
.qg-key-reveal-head strong { font-size: 13px; }
.qg-key-reveal-head small { color: rgba(255, 255, 255, .48); font-size: 10.5px; }
.qg-key-line { display: flex; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }
.qg-key-line code {
    flex: 1; min-width: 0; padding: 13px 15px; border-radius: 11px; background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12); color: #d8fff8; font-family: var(--qg-mono);
    font-size: 16px; letter-spacing: 1.6px; white-space: nowrap; overflow-x: auto;
}
.qg-key-line .qg-btn { flex: 0 0 auto; background: var(--qg-mint); color: #06251f; }
.qg-key-line .qg-btn svg { color: #06251f; }

/* ---------- plans ---------- */
.qg-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.qg-plan {
    background: #fff; border: 1px solid var(--qg-line); border-radius: var(--qg-radius);
    padding: 20px; box-shadow: var(--qg-shadow); display: flex; flex-direction: column; min-width: 0;
}
.qg-plan.off { opacity: .62; }
.qg-plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.qg-plan-code { font-family: var(--qg-mono); font-size: 10px; color: #8a97a8; letter-spacing: .5px; background: #f5f8fc; padding: 4px 8px; border-radius: 6px; }
.qg-plan h3 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.4px; }
.qg-plan p { margin: 0 0 15px; color: var(--qg-sub); font-size: 11px; line-height: 1.6; min-height: 35px; }
.qg-plan-meta { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--qg-line-2); border-bottom: 1px solid var(--qg-line-2); }
.qg-plan-meta span { display: flex; flex-direction: column; font-size: 9.5px; color: var(--qg-muted); }
.qg-plan-meta strong { color: var(--qg-ink); font-size: 17px; letter-spacing: -.4px; }
.qg-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 13px 0; min-height: 43px; }
.qg-chips span { padding: 3px 8px; border-radius: 6px; background: #eefaf7; color: #0c7c6c; font-size: 9.5px; font-family: var(--qg-mono); }
.qg-plan-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; color: var(--qg-muted); font-size: 10.5px; }

/* ---------- settings / account ---------- */
.qg-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qg-settings-grid .qg-span-2 { grid-column: 1 / -1; }
.qg-totp-setup { margin: 4px 0 14px; padding: 14px; border: 1px dashed #d9e5f1; border-radius: 11px; background: #fbfdff; }
.qg-totp-setup p { margin: 0 0 8px; color: var(--qg-sub); font-size: 11px; }
.qg-totp-setup code { display: block; word-break: break-all; font-family: var(--qg-mono); font-size: 13px; color: #0b5f54; background: var(--qg-mint-soft); padding: 9px 11px; border-radius: 8px; }
.qg-totp-setup small { display: block; margin-top: 8px; color: var(--qg-muted); font-size: 9px; word-break: break-all; }

/* ---------- flash / toast ---------- */
.qg-flash {
    display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px;
    margin-bottom: 18px; font-size: 12px; border: 1px solid #c8f0e8; background: var(--qg-mint-soft); color: #0a6558;
    animation: qg-drop .35s ease both;
}
.qg-flash.warn { background: var(--qg-amber-soft); border-color: #ffe0b2; color: #8a5308; }
.qg-flash-mark svg { width: 16px; height: 16px; }
.qg-flash button { margin-left: auto; border: 0; background: transparent; color: currentColor; opacity: .6; width: 26px; height: 26px; display: grid; place-items: center; }
.qg-flash button svg { width: 14px; height: 14px; }

/* ---------- auth ---------- */
body.qg-auth { background: #0a1425; }
body.qg-auth::before { display: none; }
.qg-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(480px, .85fr); }
.qg-auth-brand {
    position: relative; overflow: hidden; padding: 42px 54px 34px; display: flex; flex-direction: column;
    background:
        radial-gradient(700px 480px at 84% 24%, rgba(28, 199, 173, .18), transparent 60%),
        radial-gradient(500px 400px at 6% 100%, rgba(46, 111, 214, .12), transparent 60%),
        linear-gradient(155deg, #0b1729, #091322 60%, #071020);
    color: #fff;
}
.qg-auth-brand::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 0.7px, transparent 0.7px);
    background-size: 8px 8px;
    mask-image: linear-gradient(to bottom, #000, transparent 60%);
}
.qg-auth-brand-top { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.qg-auth-overline { font-size: 10px; letter-spacing: 2px; color: rgba(255, 255, 255, .4); }
.qg-auth-copy { margin: auto 0; max-width: 570px; position: relative; z-index: 1; padding: 44px 0; }
.qg-kicker { margin: 0 0 20px; font-size: 9.5px; letter-spacing: 2.2px; color: var(--qg-mint); font-weight: 650; }
.qg-auth-copy h1 { margin: 0 0 22px; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.12; letter-spacing: -2.4px; font-weight: 800; }
.qg-auth-copy > p:last-child { margin: 0; max-width: 440px; color: rgba(255, 255, 255, .52); font-size: 13px; line-height: 1.85; }
.qg-auth-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; position: relative; z-index: 1; }
.qg-auth-spec div { display: flex; flex-direction: column; gap: 4px; }
.qg-auth-spec span { font-family: var(--qg-mono); color: rgba(255, 255, 255, .25); font-size: 9px; }
.qg-auth-spec strong { font-size: 15px; letter-spacing: -.2px; }
.qg-auth-spec small { color: rgba(255, 255, 255, .38); font-size: 9.5px; }
.qg-auth-foot { display: flex; justify-content: space-between; gap: 18px; padding-top: 26px; color: rgba(255, 255, 255, .25); font-size: 9.5px; font-family: var(--qg-mono); position: relative; z-index: 1; }
.qg-auth-form { background: #f5f8fc; display: flex; align-items: center; justify-content: center; padding: 42px 44px; }
.qg-auth-form-inner { width: 100%; max-width: 368px; }
.qg-auth-head { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; }
.qg-auth-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--qg-mint-soft); color: #0b7b6b; display: grid; place-items: center; }
.qg-auth-mark svg { width: 15px; height: 15px; }
.qg-auth-head p { margin: 0; font-size: 10px; letter-spacing: 1.8px; color: var(--qg-muted); text-transform: uppercase; }
.qg-auth-form h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.9px; }
.qg-auth-form-inner > .qg-muted { margin: 0 0 22px; line-height: 1.7; }
.qg-auth-error { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 10px; background: var(--qg-danger-soft); border: 1px solid #ffd3d6; color: #a92e36; font-size: 11.5px; margin-bottom: 14px; }
.qg-auth-error svg { width: 15px; height: 15px; flex: 0 0 auto; }
.qg-auth-error.soft { background: var(--qg-amber-soft); border-color: #ffe0b2; color: #895207; }
.qg-login-form .qg-field input { height: 44px; background: #fff; }
.qg-login-form .qg-btn { height: 45px; margin-top: 3px; font-size: 13px; }
.qg-auth-hint { display: flex; gap: 9px; margin-top: 22px; padding-top: 17px; border-top: 1px solid #e2eaf5; color: var(--qg-muted); font-size: 10px; line-height: 1.6; }
.qg-auth-hint svg { width: 15px; height: 15px; flex: 0 0 auto; color: #9db0c4; }

/* ---------- veil / animations ---------- */
.qg-veil { position: fixed; inset: 0; background: rgba(4, 10, 20, .5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 35; }
body.qg-menu-open .qg-veil { opacity: 1; pointer-events: auto; }
@keyframes qg-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes qg-grow { from { transform: scaleY(.1); opacity: .3; } to { transform: scaleY(1); opacity: 1; } }
@keyframes qg-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .qg-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qg-grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qg-grid-main .qg-span-2 { grid-column: span 2; }
    .qg-detail-grid { grid-template-columns: 1fr; }
    .qg-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .qg-side { transform: translateX(-102%); transition: transform .24s ease; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
    body.qg-menu-open .qg-side { transform: none; }
    .qg-main { margin-left: 0; }
    .qg-menu { display: grid; }
    .qg-top { padding: 0 18px; height: 66px; }
    .qg-content { padding: 24px 18px 42px; }
    .qg-foot { padding: 16px 18px 22px; flex-direction: column; gap: 5px; }
    .qg-page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .qg-head-actions { padding-bottom: 0; }
    .qg-settings-grid { grid-template-columns: 1fr; }
    .qg-auth-wrap { grid-template-columns: 1fr; }
    .qg-auth-brand { padding: 34px 28px; min-height: 330px; }
    .qg-auth-copy { padding: 38px 0 26px; }
    .qg-auth-copy h1 { font-size: 42px; letter-spacing: -1.6px; }
    .qg-auth-spec { display: none; }
    .qg-auth-form { padding: 38px 24px 52px; }
}
@media (max-width: 720px) {
    .qg-top-right .qg-clock { display: none; }
    .qg-user-meta { display: none; }
    .qg-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .qg-stat { padding: 15px 14px 14px; border-radius: 14px; }
    .qg-stat > strong { font-size: 28px; }
    .qg-grid-main { grid-template-columns: 1fr; gap: 12px; }
    .qg-grid-main .qg-span-2 { grid-column: auto; }
    .qg-panel { padding: 17px 15px 15px; border-radius: 14px; }
    .qg-table-wrap { margin: 0 -15px; padding: 0 15px; }
    .qg-panel-tools { align-items: flex-start; flex-direction: column; gap: 11px; }
    .qg-filter { width: 100%; }
    .qg-search { flex: 1; min-width: 0; }
    .qg-search input { width: 100%; min-width: 0; }
    .qg-form-grid { grid-template-columns: 1fr; }
    .qg-field-row { grid-template-columns: 1fr; }
    .qg-facts { grid-template-columns: 1fr; }
    .qg-facts > div:nth-child(odd) { padding-right: 0; }
    .qg-plan-grid { grid-template-columns: 1fr; }
    .qg-detail-head { gap: 12px; }
    .qg-detail-head h1 { font-size: 25px; }
    .qg-key-line { flex-direction: column; }
    .qg-key-line code { font-size: 13px; letter-spacing: 1px; }
    .qg-key-line .qg-btn { width: 100%; }
    .qg-spark { height: 118px; gap: 5px; }
    .qg-auth-brand { min-height: 300px; padding: 28px 22px; }
    .qg-auth-copy h1 { font-size: 36px; }
    .qg-auth-copy > p:last-child { font-size: 12px; }
    .qg-auth-form { padding: 32px 20px 42px; }
    .qg-auth-form h2 { font-size: 24px; }
    .qg-auth-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
/* ---------- mobile stacked tables ---------- */
@media (max-width: 720px) {
    .qg-stack-wrap { margin: 0; padding: 0; overflow: visible; }
    .qg-stack-table, .qg-stack-table tbody, .qg-stack-table tr, .qg-stack-table td { display: block; width: 100%; }
    .qg-stack-table thead { display: none; }
    .qg-stack-table tr {
        border: 1px solid var(--qg-line); border-radius: 12px; padding: 13px 13px 8px;
        margin-bottom: 10px; background: #fbfdff;
    }
    .qg-stack-table tr:last-child { margin-bottom: 0; }
    .qg-stack-table tbody tr:hover { background: #fbfdff; }
    .qg-stack-table td {
        display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
        padding: 7px 0 !important; border-bottom: 1px dashed var(--qg-line-2);
        text-align: right; font-size: 11.5px;
    }
    .qg-stack-table td::before {
        content: attr(data-label); flex: 0 0 auto; text-align: left; color: var(--qg-muted);
        font-size: 9.5px; letter-spacing: .6px; font-weight: 600; padding-top: 2px;
    }
    .qg-stack-table td:first-child {
        display: block; text-align: left; border-bottom: 1px solid var(--qg-line-2);
        padding: 0 0 10px !important;
    }
    .qg-stack-table td:first-child::before { display: none; }
    .qg-stack-table td:first-child small { display: block; margin-top: 3px; }
    .qg-stack-table td:last-child { border-bottom: 0; padding-bottom: 2px !important; }
    .qg-stack-table td:last-child::before { padding-top: 0; }
    .qg-stack-table .qg-empty { border: 0; padding: 10px 0; }
}
@media (max-width: 720px) {
    .qg-crumb span, .qg-crumb i { display: none; }
    .qg-crumb strong { font-size: 10.5px; letter-spacing: .9px; }
    .qg-page-head h1 { font-size: 26px; letter-spacing: -.7px; }
    .qg-stack-table td.qg-stack-action { display: block; text-align: right; padding: 9px 0 0 !important; border-bottom: 0 !important; }
    .qg-stack-table td.qg-stack-action::before { display: none; }
    .qg-stack-table td.qg-stack-action .qg-icon-btn { margin-left: auto; width: 32px; height: 32px; }
}
@media (max-width: 720px) {
    .qg-stack-table td:not(:first-child):not(.qg-stack-action) {
        display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 12px;
        row-gap: 2px; align-items: start; text-align: right;
    }
    .qg-stack-table td:not(:first-child):not(.qg-stack-action)::before {
        grid-column: 1; grid-row: 1 / span 4; text-align: left; padding-top: 2px;
    }
    .qg-stack-table td:not(:first-child):not(.qg-stack-action) > * {
        grid-column: 2; justify-self: end; min-width: 0; max-width: 100%;
    }
    .qg-stack-table td:not(:first-child):not(.qg-stack-action) small {
        display: block; margin-top: 2px; line-height: 1.5;
    }
}

/* ---------- store admin ---------- */
.qg-license-key {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px;
    margin: 16px 0 20px; padding: 16px 18px; border: 1px solid #cfeee2;
    border-radius: 14px; background: #f4fcf8;
}
.qg-license-key span { grid-column: 1 / -1; color: var(--qg-muted); font-size: 10px; letter-spacing: .9px; text-transform: uppercase; }
.qg-license-key strong { font-size: 21px; letter-spacing: .8px; color: #0d2b23; word-break: break-all; }
.qg-license-key .qg-btn { align-self: center; }
.qg-order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qg-order-actions form { margin: 0; }
.qg-small { font-size: 10.5px; line-height: 1.6; }
.qg-facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qg-release-form { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--qg-line); }
.qg-release-table { margin-top: 4px; }
.qg-release-table .qg-mono { word-break: break-all; }
.qg-filter select { min-width: 118px; }
.qg-panel-tools .qg-filter { flex-wrap: wrap; }
.qg-side .qg-nav { max-height: none; }
@media (max-width: 1100px) {
    .qg-facts-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .qg-license-key { grid-template-columns: 1fr; }
    .qg-license-key strong { font-size: 17px; }
    .qg-license-key .qg-btn { width: 100%; justify-content: center; }
    .qg-order-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .qg-order-actions form, .qg-order-actions button { width: 100%; }
    .qg-release-form { padding-bottom: 12px; }
}

.qg-facts-single { grid-template-columns: 1fr; }
.qg-facts-single > div:nth-child(odd) { padding-right: 0; }
.qg-facts-single > div:nth-child(even) { padding-left: 0; border-left: 0; }
.qg-facts-single dd { text-align: right; word-break: break-word; }

@media (max-width:720px){
  .qg-menu{width:44px;height:44px}
  .qg-icon-btn{width:44px;height:44px}
  .qg-cell-action .qg-icon-btn,.qg-stack-table td.qg-stack-action .qg-icon-btn{width:44px;height:44px}
  .qg-link{min-height:40px;font-size:12.5px}
  .qg-row-title{display:inline-flex;align-items:center;min-height:40px;font-size:13px}
  .qg-stack-table td{font-size:12.5px}
  .qg-stack-table td::before{font-size:11px}
  .qg-crumb strong{font-size:12px}
  .qg-eyebrow{font-size:11px}
  .qg-spark small{font-size:9.5px}
  .qg-auth-hint{font-size:11px}
}

@media (max-width:720px){
  .qg-search input{height:44px!important;font-size:16px!important}
  .qg-filter select{height:44px!important;font-size:13px!important}
  .qg-panel-tools .qg-btn{height:44px!important}
  .qg-panel-head a,.qg-panel-head .qg-link{display:inline-flex;align-items:center;min-height:40px}
  .qg-brand-text small{font-size:10.5px}
  .qg-spark-col span{font-size:10px}
  .qg-spark-col small{font-size:10px}
  .qg-node small{font-size:10px}
}

@media (max-width:720px){
  .qg-brand-text small{font-size:10.5px!important}
  .qg-spark-col span,.qg-spark-col small{font-size:10px!important}
  .qg-spark-foot a{display:inline-flex;align-items:center;min-height:40px}
  .qg-content p a[target="_blank"]{display:inline-flex;align-items:center;min-height:40px}
  .qg-node small{font-size:10px!important}
}
