:root {
    /* Art Design Pro inspired design tokens, written locally for this PHP app. */
    --art-color: #ffffff;
    --theme-color: #5b8ff9;
    --theme-color-hover: #477ff0;
    --theme-color-light: #edf3ff;
    --theme-color-lighter: #f5f8ff;
    --default-bg-color: #f6f8fb;
    --default-box-color: #ffffff;
    --default-border: #e2e8ee;
    --default-border-dashed: #d7dfe9;
    --art-card-border: rgba(41, 48, 67, .08);
    --art-gray-100: #f9fafb;
    --art-gray-200: #f2f4f5;
    --art-gray-300: #e6eaeb;
    --art-gray-400: #dbdfe1;
    --art-gray-500: #949eb7;
    --art-gray-600: #7987a1;
    --art-gray-700: #4d5875;
    --art-gray-800: #383853;
    --art-gray-900: #323251;
    --ink: var(--art-gray-900);
    --muted: var(--art-gray-600);
    --line: var(--default-border);
    --surface: var(--default-box-color);
    --surface-soft: var(--art-gray-100);
    --success: #22a06b;
    --success-soft: #eaf8f1;
    --warning: #c58a1c;
    --warning-soft: #fff7e2;
    --danger: #e05260;
    --danger-soft: #fff0f2;
    --info: #4a80d9;
    --info-soft: #eef5ff;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .03), 0 1px 2px -1px rgba(0, 0, 0, .08);
    --shadow-popover: 0 14px 32px rgba(44, 54, 76, .12), 0 3px 8px rgba(44, 54, 76, .06);
    --shadow-modal: 0 26px 70px rgba(31, 42, 65, .20);
    --custom-radius: 12px;
    --sidebar-width: 230px;
    --topbar-height: 64px;
    --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--default-bg-color); }
body {
    margin: 0;
    color: var(--ink);
    background: var(--default-bg-color);
    font: 14px/1.6 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background: radial-gradient(circle at 88% -10%, rgba(91, 143, 249, .08), transparent 28rem);
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd3df; border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #b2bdcc; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(91, 143, 249, .22);
    outline-offset: 1px;
}
::selection { color: #fff; background: var(--theme-color); }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; fill: none; stroke: currentColor; }
.muted { color: var(--muted); }
.eyebrow {
    color: var(--art-gray-500);
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 650;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Application shell: a light Art Design Pro style vertical workspace. */
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 18px 10px;
    color: var(--art-gray-700);
    background: var(--default-box-color);
    border-right: 1px solid var(--art-card-border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 12px 18px;
    border-bottom: 1px solid var(--art-gray-200);
}
.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    color: #fff;
    background: var(--theme-color);
    border-radius: 10px;
    box-shadow: 0 7px 14px rgba(91, 143, 249, .20);
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.04em;
}
.brand strong { display: block; color: var(--art-gray-900); font-size: 14px; line-height: 1.35; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: var(--art-gray-500); font-size: 10px; line-height: 1.35; letter-spacing: .08em; }
.nav-label { padding: 22px 13px 8px; color: var(--art-gray-500); font-size: 11px; font-weight: 650; letter-spacing: .06em; }
.nav { display: grid; gap: 4px; }
.nav a {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    color: var(--art-gray-600);
    border-radius: 6px;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.nav a::before {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 0;
    width: 3px;
    content: "";
    background: transparent;
    border-radius: 0 3px 3px 0;
}
.nav a:hover { color: var(--art-gray-900); background: var(--art-gray-200); }
.nav a.active { color: var(--theme-color); background: var(--theme-color-light); font-weight: 650; }
.nav a.active::before { background: var(--theme-color); }
.nav a .icon { width: 17px; height: 17px; opacity: .9; }
.sidebar-bottom { margin-top: auto; padding: 18px 7px 4px; border-top: 1px solid var(--art-gray-200); }
.sidebar-bottom .mini-tip {
    padding: 11px 12px;
    color: var(--art-gray-600);
    background: var(--art-gray-100);
    border: 1px solid var(--art-gray-200);
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.7;
}
.main { min-width: 0; flex: 1; margin-left: var(--sidebar-width); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--art-card-border);
    backdrop-filter: blur(12px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--art-gray-500); font-size: 12px; }
.topbar-title b { display: inline-block; color: var(--art-gray-900); font-size: 16px; font-weight: 650; line-height: 1.3; }
.topbar-title span { color: var(--art-gray-500); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.balance-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--art-gray-600); font-size: 12px; }
.balance-chip .icon { width: 15px; height: 15px; color: var(--theme-color); }
.user-menu-wrap { position: relative; }
.user-menu-button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 7px 4px 4px;
    color: var(--art-gray-900);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    transition: background-color .2s ease, border-color .2s ease;
}
.user-menu-button:hover, .user-menu-button[aria-expanded="true"] { background: var(--art-gray-100); border-color: var(--art-gray-200); }
.user-menu-button strong { display: block; max-width: 120px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.user-menu-button small { display: block; margin-top: 1px; color: var(--art-gray-500); text-align: left; font-size: 10px; }
.avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    overflow: hidden;
    color: var(--theme-color);
    background: var(--theme-color-light);
    border: 1px solid rgba(91, 143, 249, .16);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu {
    position: absolute;
    top: 46px;
    right: 0;
    display: none;
    width: 196px;
    padding: 6px;
    background: var(--default-box-color);
    border: 1px solid var(--art-card-border);
    border-radius: 8px;
    box-shadow: var(--shadow-popover);
}
.user-menu.is-open { display: block; animation: fade-up .18s ease; }
.user-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; color: var(--art-gray-700); border-radius: 6px; font-size: 12px; }
.user-menu a:hover { color: var(--theme-color); background: var(--art-gray-200); }
.user-menu a .icon { width: 15px; height: 15px; }
.mobile-menu { display: none; width: 32px; height: 32px; place-items: center; padding: 0; color: var(--art-gray-700); background: transparent; border: 0; }
.page { width: min(100%, 1480px); margin: 0 auto; padding: 24px 20px 42px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { margin: 4px 0 4px; color: var(--art-gray-900); font-size: 24px; line-height: 1.3; letter-spacing: -.025em; }
.page-heading p { margin: 0; color: var(--art-gray-600); font-size: 13px; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.page-foot { padding: 0 20px 24px; color: var(--art-gray-500); font-size: 11px; }

/* Buttons, badges and cards. */
.button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    color: var(--art-gray-800);
    background: var(--default-box-color);
    border: 1px solid var(--default-border);
    border-radius: 6px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .02);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.button:hover { color: var(--theme-color); border-color: rgba(91, 143, 249, .50); box-shadow: 0 4px 10px rgba(50, 72, 111, .08); transform: translateY(-1px); }
.button:active { transform: translateY(0); box-shadow: none; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.button .icon { width: 15px; height: 15px; }
.button-primary { color: #fff; background: var(--theme-color); border-color: var(--theme-color); box-shadow: 0 5px 12px rgba(91, 143, 249, .18); }
.button-primary:hover { color: #fff; background: var(--theme-color-hover); border-color: var(--theme-color-hover); box-shadow: 0 7px 16px rgba(91, 143, 249, .25); }
.button-ghost { background: transparent; }
.button-soft { color: var(--theme-color); background: var(--theme-color-light); border-color: rgba(91, 143, 249, .22); }
.button-soft:hover { color: var(--theme-color-hover); background: #e4edff; border-color: rgba(91, 143, 249, .34); }
.button-danger { color: var(--danger); background: var(--default-box-color); border-color: rgba(224, 82, 96, .28); }
.button-danger:hover { color: #c73849; background: var(--danger-soft); border-color: rgba(224, 82, 96, .45); }
.button-small { min-height: 32px; padding: 0 10px; border-radius: 6px; font-size: 12px; }
.button-wide { width: 100%; }
.button-loading { pointer-events: none; }
.button-loading::after { width: 13px; height: 13px; content: ""; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel, .qq-card, .auth-card, .art-card {
    background: var(--default-box-color);
    border: 1px solid var(--art-card-border);
    border-radius: calc(var(--custom-radius) + 4px);
    box-shadow: var(--shadow-card);
}
.stat-card { position: relative; min-height: 128px; overflow: hidden; padding: 18px; }
.stat-card::after { position: absolute; right: -20px; bottom: -28px; width: 82px; height: 82px; content: ""; background: var(--theme-color-light); border-radius: 50%; opacity: .8; }
.stat-card .stat-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 13px; color: var(--theme-color); background: var(--theme-color-light); border-radius: 8px; }
.stat-card .stat-icon .icon { width: 18px; height: 18px; }
.stat-card span { position: relative; z-index: 1; color: var(--art-gray-600); font-size: 12px; }
.stat-card strong { position: relative; z-index: 1; display: block; margin-top: 2px; color: var(--art-gray-900); font-size: 25px; font-weight: 650; letter-spacing: -.03em; }
.panel { margin-bottom: 18px; padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; color: var(--art-gray-900); font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.panel-head p { margin: 3px 0 0; color: var(--art-gray-600); font-size: 12px; }
.panel-empty { padding: 36px 20px; color: var(--art-gray-600); text-align: center; background: var(--art-gray-100); border: 1px dashed var(--default-border-dashed); border-radius: 8px; }
.panel-empty .icon { display: block; width: 27px; height: 27px; margin: 0 auto 9px; color: var(--art-gray-500); }
.art-card-sm { border-radius: calc(var(--custom-radius) + 1px); }
.art-card-xs { border-radius: calc(var(--custom-radius) - 2px); }

.qq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qq-card { position: relative; overflow: hidden; padding: 18px; }
.qq-card.is-online { border-top: 3px solid var(--success); }
.qq-card.is-warning { border-top: 3px solid #e3aa3d; }
.qq-card.is-danger { border-top: 3px solid var(--danger); }
.qq-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.qq-identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.qq-avatar { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; overflow: hidden; color: var(--theme-color); background: var(--theme-color-light); border: 1px solid rgba(91, 143, 249, .16); border-radius: 12px; font-size: 20px; font-weight: 750; }
.qq-avatar img { width: 100%; height: 100%; object-fit: cover; }
.qq-title { min-width: 0; }
.qq-title small { display: block; overflow: hidden; color: var(--art-gray-600); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.qq-title h3 { overflow: hidden; margin: 1px 0 0; color: var(--art-gray-900); font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.instance-label { display: inline-flex; margin-bottom: 2px; color: var(--theme-color); font-size: 11px; font-weight: 700; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 650; }
.status-badge::before { width: 6px; height: 6px; content: ""; background: currentColor; border-radius: 50%; }
.tone-success { color: var(--success); background: var(--success-soft); }
.tone-info { color: var(--info); background: var(--info-soft); }
.tone-warning { color: var(--warning); background: var(--warning-soft); }
.tone-danger { color: var(--danger); background: var(--danger-soft); }
.tone-muted { color: var(--art-gray-600); background: var(--art-gray-200); }
.qq-message { display: flex; min-height: 38px; align-items: center; gap: 7px; margin: 15px 0; padding: 8px 10px; color: var(--art-gray-600); background: var(--theme-color-lighter); border-left: 3px solid #89b5ff; border-radius: 6px; font-size: 12px; }
.qq-message .icon { width: 14px; height: 14px; flex: 0 0 auto; color: var(--theme-color); }
.qq-runtime { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; padding: 10px 12px; color: var(--art-gray-600); background: var(--art-gray-100); border: 1px solid var(--art-gray-200); border-radius: 7px; font-size: 12px; }
.qq-runtime strong { color: var(--theme-color); font-size: 14px; font-weight: 650; }
.qq-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 10px 11px; background: var(--default-box-color); border: 1px solid var(--art-gray-300); border-radius: 7px; }
.metric span { display: flex; align-items: center; gap: 6px; color: var(--art-gray-600); font-size: 11px; }
.metric span .icon { width: 13px; height: 13px; }
.metric strong { display: block; margin-top: 3px; color: var(--art-gray-900); font-size: 19px; font-weight: 650; }
.qq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--art-gray-200); }
.qq-actions .button { flex: 0 0 auto; }
.qq-actions .action-spacer { flex: 1; }

/* Tables and forms follow the compact Element/Art admin rhythm. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { color: var(--art-gray-500); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-align: left; text-transform: uppercase; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--art-gray-200); white-space: nowrap; }
thead th { background: var(--art-gray-100); border-top: 1px solid var(--art-gray-200); }
thead th:first-child { border-top-left-radius: 6px; }
thead th:last-child { border-top-right-radius: 6px; }
tbody tr { transition: background-color .18s ease; }
tbody tr:hover { background: var(--art-gray-100); }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--art-gray-700); font-size: 13px; }
.table-primary { color: var(--art-gray-900); font-weight: 650; }
.table-secondary { display: block; color: var(--art-gray-500); font-size: 11px; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; color: var(--art-gray-800); font-size: 13px; font-weight: 600; }
.field-full { grid-column: 1 / -1; }
.field em { color: var(--art-gray-500); font-size: 11px; font-style: normal; font-weight: 400; }
.field small, .form-hint { color: var(--art-gray-500); font-size: 11px; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 40px; padding: 0 12px; color: var(--art-gray-900); background: var(--default-box-color); border: 1px solid var(--default-border); border-radius: 6px; outline: 0; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
input::placeholder, textarea::placeholder { color: #abb4c3; }
textarea { min-height: 100px; padding: 10px 12px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b7c4d4; }
input:focus, select:focus, textarea:focus { border-color: var(--theme-color); box-shadow: 0 0 0 3px rgba(91, 143, 249, .13); }
input:disabled, select:disabled, textarea:disabled { color: var(--art-gray-500); background: var(--art-gray-100); cursor: not-allowed; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { min-width: 210px; }
.field-check { display: flex; align-items: center; gap: 8px; color: var(--art-gray-600); font-weight: 500; }
.field-check input { width: 16px; min-height: 16px; padding: 0; accent-color: var(--theme-color); }
.form-divider { grid-column: 1 / -1; padding-top: 4px; margin-top: 2px; border-top: 1px solid var(--art-gray-200); }
.form-divider strong { display: block; margin-top: 15px; color: var(--art-gray-800); font-size: 13px; }

.alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 16px; border-radius: 7px; font-size: 12px; }
.alert .icon { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.alert-danger { color: #bd3e4d; background: var(--danger-soft); border: 1px solid rgba(224, 82, 96, .22); }
.alert-success { color: #187955; background: var(--success-soft); border: 1px solid rgba(34, 160, 107, .20); }
.alert-warning { color: #936a16; background: var(--warning-soft); border: 1px solid rgba(197, 138, 28, .22); }
.alert-info { color: #3e6eb9; background: var(--info-soft); border: 1px solid rgba(74, 128, 217, .20); }
.flash-stack { position: fixed; top: 76px; right: 20px; z-index: 70; width: min(360px, calc(100vw - 32px)); }
.flash { padding: 11px 13px; margin-bottom: 8px; color: var(--art-gray-800); background: var(--default-box-color); border: 1px solid var(--art-card-border); border-radius: 7px; box-shadow: var(--shadow-popover); animation: fade-up .25s ease; font-size: 12px; }
.flash-success { color: #187955; border-color: rgba(34, 160, 107, .25); }
.flash-warning { color: #936a16; border-color: rgba(197, 138, 28, .25); }
.flash-danger { color: #bd3e4d; border-color: rgba(224, 82, 96, .25); }

/* Authentication and installation pages. */
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: var(--default-bg-color); }
.auth-layout { display: grid; width: min(960px, 100%); grid-template-columns: .9fr 1.1fr; overflow: hidden; background: var(--default-box-color); border: 1px solid var(--art-card-border); border-radius: calc(var(--custom-radius) + 8px); box-shadow: 0 10px 30px rgba(48, 66, 98, .07); }
.auth-aside { position: relative; padding: 44px 40px; overflow: hidden; color: var(--art-gray-700); background: var(--theme-color-lighter); border-right: 1px solid var(--art-gray-200); }
.auth-aside::after { position: absolute; right: -70px; bottom: -85px; width: 230px; height: 230px; content: ""; border: 26px solid rgba(91, 143, 249, .08); border-radius: 50%; }
.auth-aside .brand { position: relative; z-index: 1; padding: 0; border-bottom: 0; }
.auth-aside .brand strong { color: var(--art-gray-900); }
.auth-aside h1 { position: relative; z-index: 1; margin: 74px 0 12px; color: var(--art-gray-900); font-size: 29px; line-height: 1.28; letter-spacing: -.04em; }
.auth-aside p { position: relative; z-index: 1; margin: 0; color: var(--art-gray-600); line-height: 1.8; }
.auth-features { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: 38px; }
.auth-feature { display: flex; align-items: flex-start; gap: 9px; color: var(--art-gray-700); font-size: 12px; }
.auth-feature .icon { flex: 0 0 auto; color: var(--theme-color); }
.auth-card { padding: 44px 48px; }
.auth-card h2 { margin: 0 0 6px; color: var(--art-gray-900); font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.auth-card .lead { margin: 0 0 26px; color: var(--art-gray-600); font-size: 13px; }
.auth-card .form-grid { gap: 15px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--art-gray-600); font-size: 12px; }
.auth-links a { color: var(--theme-color); font-weight: 600; }
.auth-links a:hover { color: var(--theme-color-hover); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; color: var(--art-gray-600); font-size: 12px; }
.auth-back:hover { color: var(--theme-color); }

.install-page { min-height: 100vh; padding: 34px 20px; background: var(--default-bg-color); }
.install-shell { width: min(820px, 100%); margin: 0 auto; }
.install-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.install-brand h1 { margin: 3px 0 2px; color: var(--art-gray-900); font-size: 22px; letter-spacing: -.03em; }
.install-brand p { margin: 0; color: var(--art-gray-600); font-size: 12px; }
.install-card { padding: 25px; background: var(--default-box-color); border: 1px solid var(--art-card-border); border-radius: calc(var(--custom-radius) + 4px); box-shadow: var(--shadow-card); }
.wizard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.wizard-head h2 { margin: 4px 0 0; color: var(--art-gray-900); font-size: 20px; letter-spacing: -.03em; }
.step-counter { color: var(--theme-color); font-size: 12px; font-weight: 650; }
.wizard-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--art-gray-200); }
.wizard-step { display: flex; align-items: center; gap: 8px; color: var(--art-gray-500); font-size: 12px; font-weight: 600; }
.wizard-step span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--art-gray-600); border: 1px solid var(--art-gray-300); border-radius: 50%; font-size: 11px; }
.wizard-step.is-active { color: var(--theme-color); }
.wizard-step.is-active span, .wizard-step.is-done span { color: #fff; background: var(--theme-color); border-color: var(--theme-color); }
.check-grid { display: grid; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--default-box-color); border: 1px solid var(--art-gray-200); border-radius: 7px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.status-dot.is-ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.status-dot.is-bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.check-item strong { display: block; color: var(--art-gray-800); font-size: 12px; }
.check-item small { display: block; color: var(--art-gray-500); font-size: 11px; }
.check-icon { margin-left: auto; color: var(--success); font-size: 11px; font-weight: 650; }
.form-hint { margin: 14px 0; }
.install-mode-box { padding: 14px; background: var(--art-gray-100); border: 1px solid var(--art-gray-200); border-radius: 7px; }
.install-mode-box p { margin: 3px 0 13px; color: var(--art-gray-600); font-size: 12px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.choice { display: flex; align-items: flex-start; gap: 8px; padding: 11px; color: var(--art-gray-800); background: var(--default-box-color); border: 1px solid var(--default-border); border-radius: 6px; cursor: pointer; }
.choice:hover { border-color: #b8c7dc; }
.choice:has(input:checked) { background: var(--theme-color-lighter); border-color: rgba(91, 143, 249, .55); box-shadow: 0 0 0 2px rgba(91, 143, 249, .08); }
.choice input { width: 15px; min-height: 15px; margin-top: 2px; padding: 0; accent-color: var(--theme-color); }
.choice b, .choice small { display: block; }
.choice b { font-size: 12px; }
.choice small { color: var(--art-gray-600); font-size: 11px; font-weight: 400; }
.choice-danger:has(input:checked) { background: #fff8f8; border-color: rgba(224, 82, 96, .50); box-shadow: 0 0 0 2px rgba(224, 82, 96, .07); }
.choice-danger input { accent-color: var(--danger); }
.install-mode-box details { margin-top: 11px; color: var(--art-gray-600); font-size: 11px; }
.install-mode-box code { display: block; padding-top: 7px; color: var(--art-gray-800); word-break: break-all; }
.inline-note { display: flex; align-items: center; gap: 7px; padding: 10px 11px; color: #187955; background: var(--success-soft); border-radius: 6px; }
.summary-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 19px; padding: 12px; background: var(--art-gray-100); border: 1px solid var(--art-gray-200); border-radius: 7px; }
.summary-box span, .summary-box strong { display: block; }
.summary-box span { color: var(--art-gray-500); font-size: 11px; }
.summary-box strong { margin-top: 2px; color: var(--art-gray-800); font-size: 12px; word-break: break-all; }
.install-foot { margin: 14px 15px 0; color: var(--art-gray-500); text-align: center; font-size: 11px; }

/* Dialogs, QQ login and operational panels. */
.modal-layer { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(38, 46, 64, .40); backdrop-filter: blur(4px); }
.modal-layer.is-open { display: grid; animation: fade-in .18s ease; }
.modal { width: min(560px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; background: var(--default-box-color); border: 1px solid rgba(41, 48, 67, .12); border-radius: 12px; box-shadow: var(--shadow-modal); }
.modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 22px 15px; border-bottom: 1px solid var(--art-gray-200); }
.modal-head h3 { margin: 0; color: var(--art-gray-900); font-size: 16px; font-weight: 650; }
.modal-head p { margin: 3px 0 0; color: var(--art-gray-600); font-size: 12px; }
.modal-close { display: grid; width: 30px; height: 30px; place-items: center; color: var(--art-gray-600); background: var(--default-box-color); border: 1px solid var(--default-border); border-radius: 6px; }
.modal-close:hover { color: var(--theme-color); background: var(--art-gray-100); border-color: rgba(91, 143, 249, .35); }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 22px; }
.login-tabs { display: flex; gap: 3px; padding: 3px; margin-bottom: 18px; background: var(--art-gray-200); border-radius: 7px; }
.login-tab { flex: 1; min-height: 34px; color: var(--art-gray-600); background: transparent; border: 0; border-radius: 5px; font-size: 12px; font-weight: 600; }
.login-tab:hover { color: var(--art-gray-900); }
.login-tab.is-active { color: var(--theme-color); background: var(--default-box-color); box-shadow: 0 1px 4px rgba(42, 58, 87, .10); }
.login-pane { display: none; }
.login-pane.is-active { display: block; }
.qr-wrap { display: grid; place-items: center; gap: 13px; padding: 16px 0 8px; }
.qr-image { display: block; width: min(270px, 80vw); aspect-ratio: 1; object-fit: contain; padding: 12px; background: #fff; border: 1px solid var(--art-gray-300); border-radius: 8px; }
.qr-placeholder { display: grid; width: min(270px, 80vw); aspect-ratio: 1; place-items: center; padding: 25px; color: var(--art-gray-500); text-align: center; background: var(--art-gray-100); border: 1px dashed var(--default-border-dashed); border-radius: 8px; }
.qr-placeholder .icon { width: 34px; height: 34px; margin-bottom: 8px; }
.qr-hint { margin: 0; color: var(--art-gray-600); text-align: center; font-size: 12px; }
.login-result { margin-bottom: 14px; }
.danger-zone { border-color: rgba(224, 82, 96, .22); }
.danger-zone .panel-head h2 { color: var(--danger); }
.log-box { max-height: 470px; overflow: auto; padding: 15px; color: #cbd6e7; background: #1d2330; border-radius: 7px; font: 12px/1.7 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-word; }
.key-value-list { display: grid; gap: 0; }
.key-value { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--art-gray-200); }
.key-value:last-child { border-bottom: 0; }
.key-value span { color: var(--art-gray-600); }
.key-value strong { color: var(--art-gray-800); text-align: right; word-break: break-all; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .sidebar { box-shadow: var(--shadow-popover); transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .main { margin-left: 0; }
    .topbar { padding: 0 17px; }
    .mobile-menu { display: grid; }
    .page { padding: 20px 16px 36px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .heading-actions { width: 100%; flex-wrap: wrap; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-card { padding: 35px 28px; }
    .page-foot { padding: 0 16px 20px; }
}
@media (max-width: 560px) {
    .topbar-title b { font-size: 14px; }
    .topbar-title > span { display: none; }
    .topbar-right { gap: 5px; }
    .topbar-right .balance-chip { display: none; }
    .user-menu-button { padding-right: 3px; }
    .user-menu-button > span:last-child { display: none; }
    .stat-grid { gap: 9px; }
    .stat-card { min-height: 112px; padding: 14px; }
    .stat-card strong { font-size: 21px; }
    .panel, .qq-card { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .inline-form { align-items: stretch; flex-direction: column; }
    .inline-form input { min-width: 0; }
    .install-card { padding: 19px; }
    .choice-row, .summary-box { grid-template-columns: 1fr; }
    .wizard-head h2 { font-size: 18px; }
    .wizard-step { font-size: 11px; }
    .wizard-step span { width: 21px; height: 21px; }
    .qq-actions .action-spacer { display: none; }
    .qq-actions .button { flex: 1 1 auto; }
    .modal-body { padding: 17px; }
    .modal-head { padding: 17px 17px 13px; }
    .modal-footer { padding: 0 17px 17px; }
    .auth-page { padding: 16px; }
    .auth-card { padding: 29px 21px; }
    .auth-card h2 { font-size: 21px; }
}
