﻿:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #182230;
    --muted: #667085;
    --line: #d9e0e8;
    --primary: #1769aa;
    --primary-dark: #0f4d7f;
    --success: #16794f;
    --danger: #b42318;
    --warning: #b54708;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell {
    display: flex;
    min-height: 100vh;
    --sidebar-width: 232px;
    --sidebar-collapsed-width: 72px;
}
.sidebar {
    width: var(--sidebar-width);
    background: #111827;
    color: #e5e7eb;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: width .18s ease, padding .18s ease;
    overflow-x: hidden;
}
.brand {
    font-size: 20px;
    font-weight: 700;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
}
.brand span,
.user-chip,
.nav-section,
.nav a,
.nav a span,
.nav-group summary,
.nav-submenu {
    transition: opacity .14s ease, transform .14s ease, width .18s ease, padding .18s ease;
}
.user-chip {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 4px;
}
.user-chip span { color: #9ca3af; font-size: 12px; }
.nav { display: grid; gap: 4px; }
.nav-section {
    margin: 12px 8px 4px;
    color: rgba(255,255,255,.58);
    font-size: 12px;
}
.nav a {
    padding: 10px 12px;
    border-radius: 6px;
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.nav a span {
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #f9fafb;
    padding: 2px 7px;
    font-size: 12px;
}
.nav a:hover, .nav a.active { background: #1f2937; color: #fff; }
.nav-group {
    display: grid;
    gap: 4px;
}
.nav-group summary {
    padding: 10px 12px;
    border-radius: 6px;
    color: #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform .16s ease;
}
.nav-group[open] summary::after { transform: rotate(225deg); }
.nav-group summary:hover,
.nav-group summary.active { background: #1f2937; color: #fff; }
.nav-submenu {
    display: grid;
    gap: 4px;
    padding-left: 8px;
}
.nav-submenu a { padding-left: 18px; }
.main { flex: 1; padding: 24px; min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.topbar h1 { margin: 0; font-size: 24px; }
.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sidebar-toggle {
    width: 40px;
    min-width: 40px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-color: #cfe0f0;
    background: #eff8ff;
    color: var(--primary-dark);
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}
.sidebar-toggle:hover {
    border-color: #9ccbea;
    background: #e4f2ff;
}
.balance {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 700;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.topbar-user-menu {
    position: relative;
}
.topbar-user-menu summary {
    list-style: none;
}
.topbar-user-menu summary::-webkit-details-marker { display: none; }
.topbar-user-summary {
    min-height: 38px;
    border: 1px solid #f1d58d;
    border-radius: 6px;
    background: #fff7d6;
    color: #7a4b00;
    padding: 4px 10px 4px 5px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    min-width: 118px;
}
.topbar-avatar,
.topbar-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex: 0 0 28px;
}
.topbar-avatar {
    object-fit: cover;
    background: #fff;
}
.topbar-avatar-fallback {
    background: #f59e0b;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.topbar-user-summary strong {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-user-summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.topbar-user-menu[open] .topbar-user-summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}
.topbar-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 168px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 40, .14);
    padding: 8px;
    z-index: 8;
}
.topbar-dropdown a,
.topbar-dropdown button {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    padding: 8px 9px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 14px;
}
.topbar-dropdown a:hover,
.topbar-dropdown button:hover {
    background: #f4f7fb;
}
.topbar-logout-form {
    margin: 6px 0 0;
    padding-top: 6px;
    border-top: 1px solid #eef2f6;
}
.topbar-logout-form button {
    color: var(--danger);
    cursor: pointer;
}
.app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding-left: 10px;
    padding-right: 10px;
}
.app-shell.sidebar-collapsed .brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.app-shell.sidebar-collapsed .brand span,
.app-shell.sidebar-collapsed .user-chip,
.app-shell.sidebar-collapsed .nav-section,
.app-shell.sidebar-collapsed .nav a span,
.app-shell.sidebar-collapsed .nav-group summary::after {
    display: none;
}
.app-shell.sidebar-collapsed .nav a,
.app-shell.sidebar-collapsed .nav-group summary {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    min-height: 42px;
    overflow: hidden;
    color: transparent;
}
.app-shell.sidebar-collapsed .nav a::first-letter,
.app-shell.sidebar-collapsed .nav-group summary::first-letter {
    color: #d1d5db;
}
.app-shell.sidebar-collapsed .nav a:hover::first-letter,
.app-shell.sidebar-collapsed .nav a.active::first-letter,
.app-shell.sidebar-collapsed .nav-group summary:hover::first-letter,
.app-shell.sidebar-collapsed .nav-group summary.active::first-letter {
    color: #fff;
}
.app-shell.sidebar-collapsed .nav-submenu {
    display: none;
}
.mobile-sidebar-backdrop,
.agent-mobile-tabbar {
    display: none;
}
.mobile-card-list,
.agent-mobile-shortcuts,
.mobile-sticky-actions {
    display: none;
}
.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.card { padding: 16px; }
.stat { display: grid; gap: 8px; }
.stat span { color: var(--muted); }
.stat strong { font-size: 28px; }
.panel { padding: 18px; margin-bottom: 16px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button, button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 6px;
    padding: 9px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
.button.primary, button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.button.primary:hover, button.primary:hover { background: var(--primary-dark); }
.full { width: 100%; }
.alert {
    border-radius: 8px;
    padding: 11px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: #fff;
}
.alert.error { border-color: #fecdca; color: var(--danger); background: #fffbfa; }
.alert.success { border-color: #abefc6; color: var(--success); background: #f6fef9; }
.alert.warning { border-color: #fedf89; color: var(--warning); background: #fffcf5; }
.floating { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3; }
.detached-form { display: none; }
.content-edit-form {
    display: grid;
    gap: 14px;
}
.content-edit-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    display: grid;
    gap: 12px;
}
.content-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.content-edit-card textarea {
    min-height: 120px;
    resize: vertical;
}
.rich-editor {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.rich-editor-toolbar button {
    min-height: 32px;
    padding: 5px 9px;
    border-radius: 6px;
    background: #fff;
}
.rich-editor-area {
    min-height: 150px;
    padding: 12px;
    color: var(--text);
    line-height: 1.7;
    outline: none;
}
.rich-editor.is-source-mode .rich-editor-area {
    white-space: pre-wrap;
    font-family: Consolas, Monaco, monospace;
    background: #0f172a;
    color: #e5e7eb;
}
.rich-editor.is-fullscreen {
    position: fixed;
    inset: 18px;
    z-index: 20;
    display: grid;
    grid-template-rows: auto 1fr;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .28);
}
.rich-editor.is-fullscreen .rich-editor-area {
    min-height: 0;
    overflow: auto;
}
.rich-editor-area:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
}
.rich-content {
    line-height: 1.7;
}
.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote,
.rich-content pre,
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin: 0 0 8px;
}
.rich-content ul,
.rich-content ol {
    padding-left: 22px;
}
.rich-content a {
    color: var(--primary);
    text-decoration: underline;
}
.rich-content blockquote {
    border-left: 3px solid var(--line);
    padding-left: 10px;
}
.rich-content pre {
    overflow: auto;
    padding: 8px;
    border-radius: 6px;
    background: #f8fafc;
}
.announcement-card {
    display: grid;
    gap: 8px;
}
.announcement-card .panel-head {
    margin-bottom: 0;
}
.announcement-card p {
    margin: 0;
    line-height: 1.65;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef2f6;
}
.login-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    display: grid;
    gap: 16px;
    box-shadow: 0 16px 50px rgba(16, 24, 40, .08);
}
.login-title {
    display: grid;
    justify-items: start;
    gap: 6px;
}
.login-title img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    margin-bottom: 4px;
}
.login-title h1 { margin: 0; font-size: 26px; }
.login-title p { margin: 0; color: var(--muted); }
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(430px, 1fr);
    background: #f3f7fb;
}
.auth-shell-simple {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 32px 18px;
}
.auth-visual {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 38px 42px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .36)),
        linear-gradient(145deg, #cfe8f7 0%, #e6f5ef 48%, #f6fbff 100%);
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr) auto;
    gap: 26px;
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #23506d;
    font-weight: 700;
}
.auth-brand img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(23, 105, 170, .14);
}
.login-title img,
.auth-brand img {
    object-fit: contain;
}
.auth-art {
    position: relative;
    min-height: 360px;
    align-self: center;
}
.art-card {
    position: absolute;
    left: 50%;
    top: 51%;
    width: min(74%, 420px);
    aspect-ratio: 1.18;
    transform: translate(-50%, -50%) rotate(-3deg);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.66)),
        repeating-linear-gradient(90deg, transparent 0 32px, rgba(23,105,170,.08) 33px 34px);
    box-shadow: 0 28px 70px rgba(36, 84, 119, .18);
}
.art-card::before,
.art-card::after {
    content: "";
    position: absolute;
    inset: 42px 46px auto;
    height: 70px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(23,105,170,.16), rgba(22,121,79,.14));
}
.art-card::after {
    top: 138px;
    width: 58%;
    height: 118px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.2)),
        linear-gradient(135deg, rgba(22,121,79,.2), rgba(23,105,170,.08));
}
.art-node {
    position: absolute;
    width: 58px;
    height: 58px;
    border: 10px solid rgba(255,255,255,.78);
    border-radius: 50%;
    background: #39b079;
    box-shadow: 0 18px 42px rgba(36, 84, 119, .2);
}
.art-node-a { left: 13%; top: 24%; background: #1769aa; }
.art-node-b { right: 12%; top: 33%; background: #f2a541; }
.art-node-c { left: 24%; bottom: 20%; }
.art-line {
    position: absolute;
    height: 2px;
    background: rgba(35, 80, 109, .2);
    transform-origin: left center;
}
.art-line-a {
    left: 22%;
    top: 34%;
    width: 48%;
    transform: rotate(16deg);
}
.art-line-b {
    left: 30%;
    bottom: 28%;
    width: 46%;
    transform: rotate(-23deg);
}
.auth-copy {
    max-width: 440px;
    display: grid;
    gap: 9px;
    color: #23506d;
}
.auth-copy strong {
    font-size: 26px;
    line-height: 1.28;
}
.auth-copy span {
    color: rgba(35, 80, 109, .72);
    line-height: 1.6;
}
.auth-panel {
    position: relative;
    min-height: 100vh;
    padding: 38px 42px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 80% 12%, rgba(22,121,79,.08), transparent 30%),
        #fff;
}
.auth-panel.wide {
    width: min(520px, 100%);
    min-height: auto;
    padding: 0;
    background: transparent;
}
.auth-theme-toggle {
    position: absolute;
    right: 28px;
    top: 24px;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    color: #35566b;
    background: #f5f8fb;
}
.auth-card {
    width: min(430px, 100%);
    display: grid;
    gap: 22px;
}
.auth-panel.wide .auth-card {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 34px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .08);
}
.auth-title {
    display: grid;
    gap: 8px;
}
.auth-title h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    color: #141d2b;
}
.auth-title p {
    margin: 0;
    color: var(--muted);
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fafc;
}
.auth-tabs button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    min-height: 38px;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.auth-tabs button:hover {
    background: #e8f2ff;
    color: var(--primary-dark);
}
.auth-tabs button.active {
    background: linear-gradient(180deg, #69a8ff, #4c91f0);
    color: #fff;
    box-shadow: 0 8px 18px rgba(76, 145, 240, .28);
}
.auth-form {
    display: grid;
    gap: 14px;
}
.auth-form.hidden { display: none; }
.auth-form input {
    min-height: 46px;
    border-radius: 8px;
    background: #fbfdff;
    padding: 11px 13px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-form input:hover {
    border-color: #9ccbea;
    background: #fff;
}
.auth-form input:focus {
    outline: none;
    border-color: #62a6f4;
    box-shadow: 0 0 0 3px rgba(76, 145, 240, .14);
}
.auth-input-with-avatar {
    position: relative;
}
.auth-input-with-avatar input {
    padding-right: 60px;
}
.auth-qq-avatar {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #d6e4f0;
    background:
        linear-gradient(135deg, #f4f8fc, #e9f1f9);
    box-shadow: 0 6px 16px rgba(16, 24, 40, .1);
    object-fit: cover;
    opacity: 0;
    transform: translateY(-50%) scale(.92);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
.auth-qq-avatar.auth-avatar-visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.auth-qq-avatar.auth-avatar-fallback {
    opacity: 0;
}
.auth-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
}
.auth-code-row button {
    min-height: 46px;
    border-radius: 8px;
    color: var(--primary);
    background: #eff7ff;
    border-color: #c7dfef;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.auth-code-row button:hover:not(:disabled) {
    background: #5b9df5;
    border-color: #5b9df5;
    color: #fff;
    box-shadow: 0 8px 18px rgba(76, 145, 240, .22);
}
.auth-code-row button:disabled {
    color: var(--muted);
    background: #f3f4f6;
    cursor: not-allowed;
}
.puzzle-verify {
    display: grid;
    gap: 8px;
    user-select: none;
}
.puzzle-stage {
    position: relative;
    width: 300px;
    max-width: 100%;
    height: 160px;
    overflow: hidden;
    border: 1px solid #cfdae5;
    border-radius: 8px;
    background: #eef4f9;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.puzzle-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.puzzle-piece {
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    border-radius: 6px;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .24);
    z-index: 2;
}
.puzzle-refresh {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    border-color: rgba(255,255,255,.76);
    background: rgba(255,255,255,.86);
    color: #25556f;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .16);
    z-index: 3;
}
.puzzle-status {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
}
.puzzle-verify.dragging .puzzle-piece { cursor: grabbing; }
.puzzle-verify.loading .puzzle-stage { opacity: .7; }
.puzzle-verify.verified .puzzle-stage {
    border-color: #9eddb8;
    box-shadow: 0 0 0 3px rgba(22,121,79,.1);
}
.puzzle-verify.verified .puzzle-status { color: var(--success); }
.puzzle-verify.error .puzzle-status { color: var(--danger); }.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
.auth-remember input {
    width: 14px;
    min-height: auto;
    margin: 0;
}
.auth-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}
.auth-link-row a {
    border-radius: 6px;
    padding: 5px 8px;
    transition: background .16s ease, color .16s ease;
}
.auth-link-row a:hover {
    background: #e8f2ff;
    color: var(--primary-dark);
}
.auth-link-row.single { justify-content: center; }
.auth-agree {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}
.auth-agree input {
    width: 14px;
    min-height: auto;
    margin-top: 2px;
}
.auth-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: #1769aa;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(23, 105, 170, .18);
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.auth-submit.register { background: #16794f; }
.auth-submit:hover:not(:disabled) {
    background: #4c91f0;
    box-shadow: 0 14px 26px rgba(76, 145, 240, .26);
    transform: translateY(-1px);
}
.auth-submit.register:hover:not(:disabled) {
    background: #15935b;
    box-shadow: 0 14px 26px rgba(21, 147, 91, .22);
}
.auth-submit:disabled {
    background: #aab7c4;
    box-shadow: none;
    cursor: not-allowed;
}
.auth-toast {
    position: fixed;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    z-index: 20;
    border-radius: 8px;
    padding: 11px 14px;
    color: #fff;
    box-shadow: 0 14px 32px rgba(16, 24, 40, .18);
}
.auth-toast.success { background: var(--success); }
.auth-toast.error { background: var(--danger); }
label { display: grid; gap: 6px; color: var(--muted); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    background: #fff;
    color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
.field-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: var(--muted);
}
.small-button {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}
.text-danger { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.upstream-form { display: grid; gap: 14px; }
.order-query-feedback {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    background: #eff6ff;
    color: #075985;
    padding: 7px 10px;
    font-weight: 600;
}
.order-query-feedback[hidden] { display: none !important; }
.order-actions button.is-loading {
    opacity: .82;
    cursor: wait;
}
.platform-options[hidden] { display: none !important; }
.common-options {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    padding: 10px 12px;
}
.inline-note { color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.options-row { grid-template-columns: 1fr 1fr 1fr; }
.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 190px auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.agent-filter-bar { grid-template-columns: minmax(220px, 1fr) 150px auto auto; }
.order-filter-bar { grid-template-columns: minmax(260px, 1fr) auto auto; }
.account-inline {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    min-width: 220px;
}
.account-inline span { color: var(--muted); }
.agent-workbench {
    display: grid;
    gap: 14px;
}
.agent-workbench-head,
.agent-toolbar,
.agent-list-card {
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}
.agent-workbench-head {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.agent-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}
.agent-workbench-head h2 {
    margin: 0 0 5px;
    font-size: 22px;
    letter-spacing: 0;
}
.agent-workbench-head p {
    margin: 0;
    color: #64748b;
    max-width: 720px;
}
.agent-command-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.agent-command-bar button,
.agent-toolbar-search .button,
.agent-toolbar-search button,
.agent-modal-actions button,
.agent-row-ops button,
.agent-credential-pill button {
    border-radius: 5px;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .10);
}
.agent-toolbar {
    display: grid;
    gap: 12px;
    padding: 14px;
}
.admin-agent-scope-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.admin-agent-scope-tabs a,
.admin-agent-scope-tabs .disabled {
    min-height: 56px;
    border: 1px solid #dfe6ef;
    border-radius: 6px;
    background: #f8fafc;
    color: #526173;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.admin-agent-scope-tabs a.active {
    border-color: #9fc4e8;
    background: #eef6ff;
    color: #0f4d7f;
    box-shadow: inset 0 0 0 1px rgba(23, 105, 170, .08);
}
.admin-agent-scope-tabs span {
    font-size: 13px;
    font-weight: 700;
}
.admin-agent-scope-tabs strong {
    color: #0f172a;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-agent-scope-tabs .disabled {
    color: #94a3b8;
}
.agent-context-panel {
    border: 1px solid #e2e8f0;
    border-left: 3px solid #1769aa;
    border-radius: 6px;
    background: linear-gradient(90deg, #f7fbff 0%, #fff 72%);
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, .8fr)) auto;
    align-items: center;
    gap: 12px;
}
.agent-context-panel div {
    min-width: 0;
    display: grid;
    gap: 3px;
}
.agent-context-panel span,
.agent-context-panel em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}
.agent-context-panel strong {
    color: #0f172a;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.agent-toolbar-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px auto auto;
    gap: 10px;
    align-items: center;
}
.agent-toolbar-search input,
.agent-toolbar-search select {
    border-radius: 5px;
    min-height: 42px;
}
.agent-toolbar-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 8px;
}
.agent-toolbar-stats span {
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #f8fafc;
    color: #64748b;
    padding: 9px 10px;
    font-size: 13px;
    min-width: 0;
}
.agent-toolbar-stats em {
    display: block;
    margin-top: 3px;
    color: #8a97a8;
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}
.agent-toolbar-stats strong {
    display: block;
    color: #0f172a;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.agent-create-compact,
.invite-code-compact,
.agent-edit-form,
.agent-password-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.invite-code-compact,
.agent-password-form {
    grid-template-columns: 1fr;
}
.invite-code-compact p,
.invite-code-list.compact {
    grid-column: 1 / -1;
}
.invite-code-list.compact {
    display: grid;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
}
.invite-code-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #f8fafc;
    padding: 8px 10px;
}
.agent-list-card {
    overflow: hidden;
}
.agent-list-heading {
    min-height: 58px;
    padding: 13px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eceff3;
}
.agent-list-heading h2 {
    margin: 0;
    font-size: 18px;
}
.agent-list-heading p {
    margin: 4px 0 0;
    color: #64748b;
}
.agent-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: auto;
}
.agent-compact-table {
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0;
}
.agent-compact-table th,
.agent-compact-table td {
    padding: 10px 12px;
    border-right: 1px solid #e8edf3;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
    font-size: 13px;
}
.agent-compact-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
}
.agent-compact-table th:last-child,
.agent-compact-table td:last-child {
    position: sticky;
    right: 0;
    border-right: 0;
    box-shadow: -10px 0 18px rgba(15, 23, 42, .05);
}
.agent-compact-table th:last-child {
    z-index: 3;
}
.agent-compact-table td:last-child {
    z-index: 2;
    background: #fff;
}
.agent-compact-table tbody tr:nth-child(odd) td { background: #fcfdff; }
.agent-compact-table tbody tr:hover td { background: #f4f8fb; }
.agent-compact-table tbody tr:nth-child(odd) td:last-child { background: #fcfdff; }
.agent-compact-table tbody tr:hover td:last-child { background: #f4f8fb; }
.number-cell {
    color: #64748b;
    white-space: nowrap;
    font-weight: 700;
}
.agent-profile-cell {
    display: block;
    min-width: 220px;
}
.agent-profile-cell strong {
    display: block;
    color: #1f2937;
    margin-bottom: 3px;
}
.agent-profile-cell span {
    display: block;
    color: #64748b;
    overflow-wrap: anywhere;
}
.agent-money-cell {
    white-space: nowrap;
    font-weight: 800;
    color: #047857;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}
.agent-parent-cell,
.agent-child-cell {
    min-width: 120px;
    display: grid;
    gap: 4px;
}
.agent-parent-cell strong {
    color: #0f172a;
}
.agent-parent-cell span,
.agent-child-cell span {
    color: #64748b;
    font-size: 12px;
}
.agent-child-cell strong {
    color: #0f4d7f;
    font-size: 20px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.agent-child-cell .button {
    width: fit-content;
    min-height: 28px;
    padding: 5px 8px;
    border-color: #cfe0f0;
    background: #f4f9ff;
    color: #0f4d7f;
}
.agent-metric-grid {
    min-width: 240px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.agent-metric-grid div {
    min-width: 0;
    border: 1px solid #e7edf4;
    border-radius: 5px;
    background: #f9fbfd;
    padding: 7px 8px;
}
.agent-metric-grid span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.agent-metric-grid strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.agent-metric-grid .money {
    color: #047857;
}
.agent-analytics-page {
    display: grid;
    gap: 16px;
}
.agent-analytics-hero {
    border: 1px solid #d8e6f0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef7f3 100%);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.agent-analytics-hero h2 {
    margin: 0;
    font-size: 22px;
}
.agent-analytics-hero p {
    margin: 6px 0 0;
    color: #64748b;
}
.analytics-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.analytics-metric-card {
    border: 1px solid #e5edf4;
    border-radius: 8px;
    background: #fbfdff;
    padding: 13px 14px;
    min-width: 0;
}
.analytics-metric-card span,
.analytics-metric-card em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}
.analytics-metric-card strong {
    display: block;
    margin: 7px 0 5px;
    color: #0f172a;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-rank-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.analytics-rank-card {
    border: 1px solid #e5edf4;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.analytics-rank-card h3 {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f5;
    background: #f8fafc;
    font-size: 15px;
}
.analytics-rank-list {
    display: grid;
}
.analytics-rank-list a {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f3f6;
}
.analytics-rank-list a:hover {
    background: #f8fbff;
}
.analytics-rank-no {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f2ff;
    color: #0f4d7f;
    font-weight: 800;
}
.analytics-rank-agent {
    min-width: 0;
}
.analytics-rank-agent strong,
.analytics-rank-agent em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-rank-agent em {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}
.analytics-rank-list b {
    color: #047857;
    font-variant-numeric: tabular-nums;
}
.analytics-rank-list .muted {
    padding: 14px;
}
.analytics-trend-table table {
    min-width: 980px;
}
.analytics-bars {
    min-width: 160px;
    display: grid;
    gap: 4px;
}
.analytics-bars span,
.analytics-bars em {
    display: block;
    min-width: 34px;
    max-width: 100%;
    border-radius: 999px;
    padding: 2px 7px;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}
.analytics-bars span {
    background: #1769aa;
}
.analytics-bars em {
    background: #16845d;
}
.agent-money-note,
.agent-level-stack span {
    color: #64748b;
    font-size: 12px;
}
.agent-level-stack,
.agent-credential-stack,
.agent-row-ops {
    display: grid;
    gap: 7px;
}
.agent-level-stack strong {
    color: #0f172a;
}
.agent-credential-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #64748b;
}
.agent-credential-pill span {
    min-width: 44px;
    font-weight: 700;
}
.agent-credential-pill code {
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 3px 7px;
    font-variant-numeric: tabular-nums;
}
.agent-credential-pill em {
    color: #94a3b8;
    font-style: normal;
}
.agent-row-ops {
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
    align-items: center;
}
.agent-row-ops button {
    min-height: 30px;
}
.password-reset-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
}
.password-reset-row input { min-width: 0; }
.agent-modal-open {
    overflow: hidden;
}
.agent-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, .38);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}
.agent-modal-backdrop[hidden] { display: none; }
.agent-modal {
    width: min(460px, 100%);
    min-height: 100%;
    background: #fff;
    box-shadow: -18px 0 42px rgba(15, 23, 42, .24);
    display: grid;
    grid-template-rows: auto 1fr;
    animation: agent-modal-enter .16s ease-out;
}
@keyframes agent-modal-enter {
    from { transform: translateX(16px); opacity: .75; }
    to { transform: translateX(0); opacity: 1; }
}
.agent-modal-head {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.agent-modal-head span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}
.agent-modal-head h3 {
    margin: 0;
    font-size: 20px;
}
.agent-modal-head button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
}
.agent-modal-body {
    padding: 18px 20px 20px;
    align-content: start;
    overflow: auto;
}
.agent-modal-body label {
    min-width: 0;
}
.agent-modal-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eef2f6;
    padding-top: 14px;
    margin-top: 4px;
}
.agent-balance-preview,
.agent-balance-after {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    padding: 11px 12px;
}
.agent-balance-preview span,
.agent-balance-after span {
    color: #64748b;
}
.agent-balance-preview strong,
.agent-balance-after strong {
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}
.agent-transfer-preview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.agent-transfer-preview > div {
    display: grid;
    gap: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
    padding: 11px 12px;
}
.agent-transfer-preview span {
    color: #64748b;
    font-size: .82rem;
}
.agent-transfer-preview strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.segmented,
.toggle-line {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 7px 10px;
    color: var(--text);
}
.segmented label,
.toggle-line {
    display: flex;
    align-items: center;
    gap: 8px;
}
.segmented input,
.toggle-line input { width: auto; }
.order-actions { align-items: center; margin-top: 2px; }
.project-search-row { margin: 0; }
.project-search-row .product-search-tip {
    display: block;
    margin: 4px 0 6px;
    color: #b45309;
    font-weight: 700;
    line-height: 1.45;
}
.product-select-row { display: grid; gap: 6px; }
.product-results-note {
    color: #b45309;
    font-weight: 700;
    line-height: 1.45;
}
.favorite-product-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.favorite-product-inline button {
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 5px;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}
.favorite-product-inline small {
    font-size: 12px;
    line-height: 1.3;
}
.project-channel-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
}
.project-channel-strip > span {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}
.project-channel-strip > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.project-channel-strip button {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 13px;
    background: #fff;
}
.project-feed-empty {
    border: 1px dashed #b9c7d6;
    border-radius: 8px;
    background: #f8fafc;
    padding: 18px;
    display: grid;
    gap: 8px;
    line-height: 1.55;
}
.project-feed-empty strong {
    font-size: 16px;
    color: var(--text);
}
.project-feed-empty p {
    margin: 0;
    color: var(--muted);
}
.project-hot-search {
    display: grid;
    grid-template-columns: auto minmax(220px, 360px) auto;
    align-items: center;
    gap: 10px;
    margin: 10px 0 4px;
}
.project-hot-search label {
    font-weight: 700;
    color: var(--text);
}
.project-hot-search input {
    min-height: 38px;
}
.project-rank-heading {
    margin: 18px 0 10px;
    font-size: 16px;
}
.agent-tutorial-page {
    display: grid;
    gap: 16px;
}
.agent-tutorial-page .panel-head {
    margin-bottom: 0;
}
.agent-tutorial-source {
    border: 1px solid #d9e8f6;
    border-radius: 8px;
    background: #f2f8fd;
    color: var(--primary-dark);
    padding: 10px 12px;
    font-size: 13px;
}
.agent-tutorial-list {
    display: grid;
    gap: 14px;
}
.agent-tutorial-step {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    display: grid;
    gap: 12px;
}
.agent-tutorial-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.agent-tutorial-step-head span {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.agent-tutorial-step-head h3 {
    margin: 0;
    font-size: 17px;
}
.agent-tutorial-notes {
    margin: 0;
    padding-left: 20px;
    color: #344054;
    line-height: 1.7;
}
.agent-tutorial-link {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.agent-tutorial-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.agent-tutorial-media {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}
.agent-tutorial-media img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}
.agent-tutorial-media figcaption {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 10px;
}
.order-upstream-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}
.order-upstream-meta > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 10px 12px;
    display: grid;
    gap: 5px;
}
.order-upstream-meta span {
    color: var(--muted);
    font-size: 12px;
}
.order-upstream-meta strong {
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.product-docking-inline {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.product-docking-inline b {
    color: var(--muted);
    font-weight: 600;
}
.query-result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.order-info-panel { padding: 0; overflow: hidden; }
.order-info-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.order-info-tabs button {
    min-height: 44px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
}
.order-info-tabs button.active {
    color: var(--primary-dark);
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--primary);
    font-weight: 700;
}
.order-info-body {
    padding: 14px 18px 16px;
    display: grid;
    gap: 8px;
    line-height: 1.65;
}
.order-info-body p {
    margin: 0;
    color: var(--text);
}
.order-info-body p + p { margin-top: 8px; }
.tianhe-order-panel {
    padding: 0 0 16px;
}
.tianhe-order-panel .panel-head {
    min-height: 42px;
    padding: 0 16px;
    margin: 0;
    border-bottom: 1px solid #ebeef5;
}
.tianhe-order-panel .panel-head h2 {
    position: relative;
    margin: 0;
    padding-left: 10px;
    color: #222;
    font-size: 14px;
    line-height: 42px;
}
.tianhe-order-panel .panel-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 4px;
    height: 20px;
    border-radius: 3px;
    background: #8b5cf6;
}
.order-list-filter-bar {
    display: grid;
    gap: 12px;
    padding: 14px 16px 0;
    margin-bottom: 12px;
}
.order-list-filter-bar input,
.order-list-filter-bar select {
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    color: #303133;
    font-size: 14px;
    background: #fff;
}
.order-list-filter-bar input::placeholder {
    color: #a8abb2;
}
.order-filter-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.order-filter-line-top select {
    width: 260px;
}
.order-search-line input {
    width: 584px;
    max-width: 100%;
}
.tianhe-query-button {
    min-width: 102px;
    min-height: 38px;
    height: 38px;
    border: 0;
    border-radius: 6px;
    background: #7c4dff;
    color: #fff;
    font-weight: 700;
    padding: 0 18px;
}
.order-export-row {
    gap: 6px;
}
.order-export-row select:nth-child(1) { width: 220px; }
.order-export-row select:nth-child(2) { width: 130px; }
.order-export-row select:nth-child(3) { width: 100px; }
.tianhe-export-button {
    min-width: 70px;
    min-height: 38px;
    height: 38px;
    border: 0;
    border-radius: 6px;
    background: #409eff;
    color: #fff;
    font-weight: 700;
    padding: 0 18px;
}
.order-advanced-filters summary {
    width: fit-content;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
}
.order-advanced-filters > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.order-advanced-filters input[type="date"] {
    width: 150px;
}
.order-advanced-filters .toggle-line {
    width: 130px;
    min-height: 38px;
    padding: 0 10px;
    display: flex;
}
.order-advanced-filters .toggle-line input {
    width: auto;
    height: auto;
    min-height: 0;
}
.order-batch-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 14px;
    padding: 0 16px;
}
.order-batch-actions button {
    min-height: 28px;
    height: 28px;
    padding: 0 14px;
    border-color: #b3e19d;
    background: #f0f9eb;
    color: #67c23a;
    border-radius: 3px;
    font-size: 13px;
}
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #ebeef5;
    color: var(--muted);
    font-size: 13px;
}
.pagination-actions,
.order-page-jump,
.order-page-jump label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.order-page-jump {
    margin: 0;
}
.order-page-jump input[type="number"] {
    width: 72px;
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
}
.order-page-jump button {
    min-height: 30px;
    height: 30px;
    padding: 0 12px;
}
.order-mobile-bulk-select {
    display: none;
}
.order-detail-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 6px 12px;
    color: var(--muted);
    font-size: 13px;
}
.order-detail-grid strong {
    color: var(--text);
}
.order-message {
    max-width: 280px;
    line-height: 1.5;
}
.tianhe-task-table-wrap {
    border: 0;
    border-top: 1px solid #ebeef5;
    border-radius: 0;
    background: #fff;
}
.tianhe-task-table {
    min-width: 1220px;
    font-size: 13px;
}
.tianhe-task-table th,
.tianhe-task-table td {
    padding: 8px 9px;
    vertical-align: middle;
}
.tianhe-task-table th {
    white-space: nowrap;
    color: #4b5563;
}
.tianhe-task-table tbody tr:nth-child(odd) { background: #fbfcfe; }
.tianhe-task-table tbody tr:hover { background: #f2f6fb; }
.order-select-cell {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}
.order-select-cell input { width: auto; }
.order-mobile-card-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}
.order-mobile-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    flex: 0 0 auto;
}
.order-mobile-select input {
    width: 16px;
    height: 16px;
    margin: 0;
}
.task-row-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.task-row-actions form {
    margin: 0;
    display: inline-flex;
}
.task-row-actions button,
.tianhe-task-table [data-action="toggle-order-selection"] {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    height: 28px;
    padding: 0;
    border-radius: 5px;
    background: #fff;
    color: var(--primary-dark);
    border-color: #c8d7e6;
    line-height: 1;
}
.order-action-icon {
    display: inline-grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}
.order-action-icon.action-sync,
.order-action-icon.action-refill {
    border-color: #b3e19d;
    background: #f0f9eb;
    color: #55a630;
}
.order-action-icon.action-detail {
    border-color: #a7d2ff;
    background: #edf6ff;
    color: #409eff;
}
.order-action-icon.action-feedback {
    border-color: #a7d28a;
    background: #eef8e8;
    color: #3f8f2f;
}
.order-action-icon.action-copy {
    border-color: #d5dce7;
    background: #fff;
    color: #64748b;
}
.tianhe-task-table [data-action="toggle-order-selection"] {
    width: auto;
    min-width: 42px;
    padding: 0 7px;
    font-size: 12px;
}
.task-inline-edit {
    margin-top: 6px;
    color: var(--muted);
}
.task-inline-edit summary {
    cursor: pointer;
    font-size: 12px;
}
.task-inline-edit .inline-edit {
    grid-template-columns: minmax(130px, 1fr) auto;
    margin-top: 6px;
}
.task-inline-edit input {
    min-height: 30px;
    padding: 5px 7px;
}
.task-inline-edit button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
}
.order-progress-bar {
    position: relative;
    width: 116px;
    height: 18px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
    color: #1f2937;
}
.order-progress-bar span {
    display: block;
    height: 100%;
    background: #67c23a;
    min-width: 2px;
}
.order-progress-bar em {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 12px;
    line-height: 18px;
}
.order-progress-circle {
    --progress: 0;
    --progress-color: #0b8f2a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background:
        radial-gradient(circle at center, #fff 58%, transparent 60%),
        conic-gradient(var(--progress-color) calc(var(--progress) * 1%), #e6ebf2 0);
    box-shadow: inset 0 0 0 1px #e1e8f0;
}
.order-progress-circle span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #5f6b7a;
    font-size: 8px;
    line-height: 1;
    font-style: normal;
    white-space: nowrap;
}
.task-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--success);
    padding: 3px 8px;
    white-space: nowrap;
}
.task-detail {
    max-width: 260px;
    line-height: 1.45;
    word-break: break-word;
}
.order-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.42);
}
.order-modal-backdrop[hidden] { display: none; }
.order-modal {
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}
.order-modal-head {
    min-height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.order-modal-head button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    border: 0;
    background: transparent;
    color: #606266;
    font-size: 22px;
    padding: 0;
}
.order-modal-body { padding: 0; }
.order-detail-list {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    margin: 0;
}
.order-detail-list dt,
.order-detail-list dd {
    min-height: 44px;
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #ebeef5;
}
.order-detail-list dt {
    color: #1f2937;
    font-weight: 700;
}
.order-detail-list dd {
    color: #334155;
    word-break: break-word;
}
.order-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 14px;
}
.order-modal-actions form {
    margin: 0;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.order-modal-actions .inline-edit {
    grid-template-columns: minmax(130px, 180px) auto;
}
.order-modal-actions input {
    min-height: 32px;
    padding: 6px 8px;
}
.order-feedback-modal textarea {
    width: calc(100% - 28px);
    margin: 0 14px;
    min-height: 94px;
    resize: vertical;
}
.feedback-warning {
    margin: 14px 14px 10px;
    color: #e68a00;
    font-size: 12px;
    line-height: 1.6;
}
.copy-order-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.admin-order-display-panel { border-color: #d4e4f1; }
.admin-order-display-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.admin-display-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: start;
}
.admin-display-card p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.admin-rule-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.admin-product-category-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.admin-product-category-preview > strong {
    line-height: 30px;
    white-space: nowrap;
}
.admin-product-category-preview > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.admin-product-category-preview span {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--muted);
}
.admin-rule-preview > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 13px;
}
.admin-rule-preview h3 {
    margin: 0 0 9px;
    font-size: 15px;
}
.admin-rule-preview p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.admin-rule-preview p + p { margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #f8fafc; }
.badge { display: inline-flex; border-radius: 999px; padding: 3px 8px; background: #eef2f6; color: var(--muted); font-size: 12px; }
.badge.ok { background: #dcfae6; color: var(--success); }
.badge.bad { background: #fee4e2; color: var(--danger); }
.badge.warn { background: #fef0c7; color: var(--warning); }
.login-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--success);
}
.login-links a { color: var(--success); }
.register-card { width: min(460px, 100%); }
.inline-action-form {
    display: inline-flex;
    margin: 0;
}
.invite-code {
    font-size: 20px !important;
    letter-spacing: 0;
}
.invite-code-panel {
    display: grid;
    gap: 12px;
}
.invite-code-form {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto minmax(220px, 1fr);
    gap: 10px;
    align-items: end;
    justify-content: start;
}
.invite-code-form .muted {
    align-self: center;
}
.invite-code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.invite-code-list h3 {
    flex: 0 0 100%;
    margin: 0;
    font-size: 15px;
}
.invite-code-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    padding: 7px 9px;
}
.invite-code-row code {
    color: var(--text);
    font-weight: 700;
}
.course-list { display: grid; gap: 8px; max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.course-list-collapsed { max-height: 260px; }
.course-item { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.course-item input { width: auto; margin-top: 3px; }
.batch-account-results { display: grid; gap: 14px; }
.batch-continue-form { display: flex; justify-content: flex-end; margin: -2px 0 2px; }
.batch-account-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; }
.batch-account-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.batch-account-group .course-list { max-height: 260px; }
.course-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    margin-bottom: 12px;
}
.muted { color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stack-form { display: grid; gap: 8px; min-width: 220px; }
.inline-edit {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
}
.inline-edit input { min-width: 0; }
.price-levels { display: grid; gap: 8px; margin-top: 4px; }
.price-level-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr .8fr .9fr;
    gap: 8px;
    align-items: center;
}
.price-level-head {
    color: var(--muted);
    font-weight: 600;
    padding: 0 2px;
}
.price-preview {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    padding: 9px 10px;
}
.recharge-form {
    display: grid;
    gap: 14px;
}
.recharge-plans {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
}
.recharge-plan {
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 12px;
    display: grid;
    gap: 5px;
    text-align: left;
    cursor: pointer;
}
.recharge-plan strong { font-size: 16px; }
.recharge-plan span { color: var(--muted); }
.recharge-plan em {
    color: var(--success);
    font-style: normal;
    font-size: 13px;
}
.recharge-plan.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 105, 170, .14);
}
.pay-type-row {
    display: flex;
    gap: 16px;
    align-items: center;
}
.recharge-payment-modal-open {
    overflow: hidden;
}
.recharge-payment-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, .42);
    display: grid;
    place-items: center;
    padding: 20px;
}
.recharge-payment-modal-backdrop[hidden] {
    display: none;
}
.recharge-result {
    width: min(460px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.recharge-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.recharge-result-head h3 {
    margin: 0;
}
.recharge-result-head button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
}
.recharge-payment-warning {
    margin: 10px 0 12px;
    padding: 9px 10px;
    border: 1px solid rgba(220, 38, 38, .24);
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 700;
    text-align: center;
}
.recharge-result img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.payment-callbacks {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}
.payment-callbacks div {
    display: grid;
    gap: 4px;
}
.payment-callbacks code {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    padding: 8px;
    word-break: break-all;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-shell-simple { padding: 24px 14px; }
    .auth-visual {
        min-height: auto;
        padding: 24px;
        grid-template-rows: auto auto;
    }
    .auth-art { display: none; }
    .auth-copy strong { font-size: 20px; }
    .auth-panel {
        min-height: auto;
        padding: 28px 18px;
    }
    .auth-panel.wide { width: 100%; }
    .auth-panel.wide .auth-card { padding: 26px 18px; }
    .auth-theme-toggle {
        right: 16px;
        top: 14px;
    }
    .auth-card { width: 100%; }
    .auth-title h1 { font-size: 26px; }
    .auth-code-row { grid-template-columns: 1fr; }
    .app-shell { display: block; }
    .role-agent-shell.app-shell {
        min-height: 100vh;
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }
    .role-agent-shell .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 90;
        width: min(82vw, 320px);
        min-height: 100vh;
        transform: translateX(-102%);
        box-shadow: 20px 0 48px rgba(15, 23, 42, .22);
    }
    .role-agent-shell.mobile-nav-open .sidebar {
        transform: translateX(0);
    }
    .role-agent-shell .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 80;
        display: block;
        border: 0;
        padding: 0;
        min-height: 0;
        background: rgba(15, 23, 42, .44);
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
    }
    .role-agent-shell.mobile-nav-open .mobile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .role-admin-shell .sidebar,
    .sidebar { width: 100%; min-height: auto; }
    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .topbar-user-summary {
        min-width: 104px;
    }
    .topbar-dropdown {
        right: 0;
    }
    .cards-3, .cards-4, .form-grid, .form-row, .options-row, .course-toolbar, .price-level-row, .filter-bar, .agent-filter-bar, .agent-toolbar-search, .agent-create-compact, .invite-code-compact, .agent-edit-form, .agent-password-form, .order-detail-grid, .password-reset-row, .invite-code-form, .project-channel-strip, .order-upstream-meta, .admin-order-display-grid, .admin-product-category-preview, .admin-rule-preview, .recharge-plans { grid-template-columns: 1fr; }
    .order-filter-line,
    .order-advanced-filters > div { display: grid; grid-template-columns: 1fr; }
    .order-filter-line-top select,
    .order-search-line input,
    .order-export-row select,
    .order-advanced-filters input[type="date"],
    .order-advanced-filters .toggle-line { width: 100% !important; }
    .admin-product-category-preview > strong { line-height: 1.4; }
    .favorite-product-inline {
        flex-wrap: wrap;
        margin-top: 2px;
    }
    .project-channel-strip > span { white-space: normal; }
    .agent-tutorial-media-grid {
        grid-template-columns: 1fr;
    }
    .order-info-tabs button { flex: 1 1 auto; border-bottom: 1px solid var(--line); }
    .agent-workbench { gap: 12px; }
    .agent-workbench-head {
        flex-direction: column;
        padding: 14px;
    }
    .agent-command-bar {
        width: 100%;
        justify-content: stretch;
    }
    .agent-command-bar button {
        flex: 1 1 140px;
    }
    .admin-agent-scope-tabs {
        grid-template-columns: 1fr;
    }
    .admin-agent-scope-tabs a,
    .admin-agent-scope-tabs .disabled {
        min-height: 48px;
    }
    .agent-context-panel {
        grid-template-columns: 1fr;
    }
    .agent-context-panel .button {
        width: 100%;
        justify-content: center;
    }
    .agent-toolbar-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .agent-toolbar-stats span { flex: 1 1 140px; }
    .agent-list-heading { align-items: flex-start; flex-direction: column; }
    .agent-modal-backdrop {
        align-items: flex-end;
    }
    .agent-modal {
        width: 100%;
        min-height: auto;
        max-height: 92vh;
    }
    .price-level-head { display: none; }
    .role-agent-shell .topbar {
        position: sticky;
        top: 0;
        z-index: 40;
        margin: -16px -16px 14px;
        padding: 12px 14px;
        background: rgba(244, 246, 248, .96);
        border-bottom: 1px solid rgba(217, 224, 232, .82);
        backdrop-filter: blur(12px);
    }
    .role-agent-shell .topbar h1 {
        max-width: 54vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 20px;
    }
    .role-agent-shell .topbar-actions {
        width: auto;
        margin-left: auto;
        gap: 8px;
    }
    .role-agent-shell .balance {
        padding: 7px 9px;
        font-size: 12px;
    }
    .role-agent-shell .topbar-user-summary {
        min-width: 0;
        padding: 6px;
    }
    .role-agent-shell .topbar-user-summary strong {
        display: none;
    }
    .role-agent-shell .agent-mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid rgba(217, 224, 232, .95);
        box-shadow: 0 -12px 30px rgba(15, 23, 42, .08);
        backdrop-filter: blur(14px);
    }
    .role-agent-shell .agent-mobile-tabbar a {
        display: grid;
        place-items: center;
        min-height: 48px;
        border-radius: 8px;
        color: #475467;
        font-weight: 700;
        font-size: 13px;
    }
    .role-agent-shell .agent-mobile-tabbar a.active {
        background: #e8f3fb;
        color: var(--primary-dark);
    }
    .role-agent-shell .mobile-card-list,
    .role-admin-shell .mobile-card-list {
        display: grid;
        gap: 10px;
    }
    .role-agent-shell .agent-mobile-shortcuts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 12px;
    }
    .role-agent-shell .agent-mobile-shortcuts .button {
        min-height: 48px;
    }
    .role-agent-shell .mobile-card,
    .role-admin-shell .mobile-card {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        padding: 12px;
        display: grid;
        gap: 10px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
    }
    .role-agent-shell .mobile-card-head,
    .role-agent-shell .mobile-card-row,
    .role-agent-shell .mobile-card-actions,
    .role-admin-shell .mobile-card-head,
    .role-admin-shell .mobile-card-row,
    .role-admin-shell .mobile-card-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .role-agent-shell .mobile-card-head,
    .role-admin-shell .mobile-card-head {
        align-items: flex-start;
    }
    .role-agent-shell .mobile-card-head strong,
    .role-admin-shell .mobile-card-head strong {
        font-size: 15px;
        line-height: 1.35;
    }
    .role-agent-shell .mobile-card-row,
    .role-admin-shell .mobile-card-row {
        align-items: flex-start;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
    }
    .role-agent-shell .mobile-card-row span:first-child,
    .role-admin-shell .mobile-card-row span:first-child {
        flex: 0 0 auto;
        color: #475467;
        font-weight: 700;
    }
    .role-agent-shell .mobile-card-row span:last-child,
    .role-agent-shell .mobile-card-row strong,
    .role-admin-shell .mobile-card-row span:last-child,
    .role-admin-shell .mobile-card-row strong {
        min-width: 0;
        text-align: right;
        word-break: break-word;
    }
    .role-agent-shell .mobile-card-actions,
    .role-admin-shell .mobile-card-actions {
        justify-content: stretch;
        flex-wrap: wrap;
        padding-top: 2px;
    }
    .role-agent-shell .mobile-card-actions button,
    .role-agent-shell .mobile-card-actions .button,
    .role-agent-shell .mobile-card-actions form,
    .role-admin-shell .mobile-card-actions button,
    .role-admin-shell .mobile-card-actions .button,
    .role-admin-shell .mobile-card-actions form {
        flex: 1 1 92px;
        margin: 0;
    }
    .role-agent-shell .mobile-card-actions button,
    .role-agent-shell .mobile-card-actions .button,
    .role-admin-shell .mobile-card-actions button,
    .role-admin-shell .mobile-card-actions .button {
        width: 100%;
    }
    .role-agent-shell .mobile-sticky-actions {
        position: sticky;
        bottom: calc(70px + env(safe-area-inset-bottom));
        z-index: 55;
        margin: 12px -4px 0;
        padding: 10px;
        border: 1px solid rgba(217, 224, 232, .92);
        border-radius: 8px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
        backdrop-filter: blur(12px);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .role-agent-shell .tianhe-task-table-wrap,
    .role-agent-shell .agent-table-wrap,
    .role-agent-shell .recharge-panel + .panel .table-wrap,
    .role-agent-shell .balance-table-wrap {
        display: none;
    }
    .role-agent-shell .order-mobile-cards,
    .role-agent-shell .recharge-history-cards,
    .role-agent-shell .agent-mobile-cards,
    .role-agent-shell .balance-mobile-cards {
        margin-top: 10px;
    }
    .role-admin-shell .tianhe-task-table-wrap {
        display: none;
    }
    .role-admin-shell .order-mobile-cards {
        margin-top: 10px;
    }
    .role-agent-shell .order-list-filter-bar {
        padding: 12px 12px 0;
    }
    .role-admin-shell .order-list-filter-bar {
        padding: 12px 12px 0;
    }
    .role-agent-shell .order-filter-line {
        gap: 8px;
    }
    .role-admin-shell .order-filter-line {
        gap: 8px;
    }
    .role-agent-shell .order-export-row {
        display: none;
    }
    .role-admin-shell .order-export-row {
        display: none;
    }
    .role-agent-shell .order-batch-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 12px;
        margin-bottom: 10px;
    }
    .role-admin-shell .order-batch-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0 12px;
        margin-bottom: 10px;
    }
    .role-agent-shell .order-batch-actions button {
        width: 100%;
        height: 44px;
        min-height: 44px;
    }
    .role-admin-shell .order-batch-actions button {
        width: 100%;
        height: 44px;
        min-height: 44px;
    }
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 12px;
    }
    .pagination-actions {
        width: 100%;
    }
    .order-page-jump {
        width: 100%;
    }
    .order-page-jump label {
        flex: 1 1 auto;
    }
    .order-page-jump input[type="number"] {
        flex: 1 1 80px;
        min-width: 0;
    }
    .order-mobile-bulk-select {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .role-agent-shell .order-panel,
    .role-agent-shell .query-result-panel,
    .role-agent-shell .order-info-panel,
    .role-agent-shell .recharge-panel,
    .role-agent-shell .panel,
    .role-agent-shell .agent-workbench-head,
    .role-agent-shell .agent-toolbar,
    .role-agent-shell .agent-list-card {
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 14px;
    }
    .role-agent-shell .tianhe-order-panel {
        padding: 0 0 12px;
    }
    .role-admin-shell .tianhe-order-panel {
        padding: 0 0 12px;
    }
    .role-agent-shell .panel-head {
        align-items: flex-start;
        margin-bottom: 12px;
    }
    .role-admin-shell .panel-head {
        align-items: flex-start;
        margin-bottom: 12px;
    }
    .role-agent-shell .panel-head h2,
    .role-agent-shell .agent-workbench-head h2 {
        font-size: 18px;
    }
    .role-admin-shell .panel-head h2 {
        font-size: 18px;
    }
    .role-agent-shell .panel-subtitle,
    .role-agent-shell .agent-workbench-head p,
    .role-agent-shell .agent-list-heading p {
        display: none;
    }
    .role-admin-shell .panel-subtitle {
        display: none;
    }
    .role-agent-shell .upstream-form,
    .role-agent-shell .recharge-form {
        gap: 12px;
    }
    .role-agent-shell .order-upstream-meta > div {
        max-height: 86px;
        overflow: auto;
    }
    .role-agent-shell .favorite-product-inline {
        display: grid;
        gap: 6px;
        width: 100%;
    }
    .role-agent-shell .favorite-product-inline button {
        width: fit-content;
        min-height: 34px;
    }
    .role-agent-shell textarea#accountInfo {
        min-height: 138px;
    }
    .role-agent-shell .order-actions,
    .role-agent-shell .course-toolbar,
    .role-agent-shell .actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .role-agent-shell .course-list {
        max-height: 48vh;
        padding: 8px;
    }
    .role-agent-shell .course-item {
        align-items: flex-start;
        padding: 10px 4px;
    }
    .role-agent-shell .course-item input {
        margin-top: 3px;
    }
    .role-agent-shell .order-submit-bar,
    .role-agent-shell .recharge-submit-bar {
        display: flex;
    }
    .role-agent-shell .recharge-plans {
        grid-template-columns: 1fr;
    }
    .role-agent-shell .recharge-plan {
        min-height: 76px;
    }
    .role-agent-shell .pay-type-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .role-agent-shell .pay-type-row label {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px;
        background: #fff;
    }
    .role-agent-shell .recharge-result {
        text-align: center;
        width: 100%;
        max-height: 86vh;
        border-radius: 14px 14px 0 0;
    }
    .role-agent-shell .recharge-result-meta {
        display: grid;
        gap: 8px;
        text-align: left;
    }
    .role-agent-shell #recharge-qr canvas,
    .role-agent-shell #recharge-qr img {
        max-width: min(72vw, 240px);
        height: auto;
    }
    .role-agent-shell .recharge-payment-modal-backdrop {
        align-items: end;
        place-items: end stretch;
        padding: 0;
    }
    .role-agent-shell .agent-workbench {
        display: grid;
        gap: 12px;
    }
    .role-agent-shell .agent-toolbar-search {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .role-agent-shell .agent-toolbar-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .role-agent-shell .agent-list-heading {
        padding-bottom: 10px;
    }
    .role-agent-shell .form-grid,
    .role-agent-shell .cards-2,
    .role-agent-shell .cards-3,
    .role-agent-shell .cards-4 {
        grid-template-columns: 1fr;
    }
    .role-agent-shell .stat strong {
        font-size: 22px;
    }
    .role-agent-shell .agent-mobile-profile + #password {
        margin-top: 0;
    }
    .role-agent-shell .mobile-sticky-actions button,
    .role-agent-shell .mobile-sticky-actions .button {
        flex: 0 0 auto;
    }
    .role-agent-shell .order-modal-backdrop,
    .role-agent-shell .agent-modal-backdrop {
        align-items: end;
        place-items: end stretch;
        padding: 0;
    }
    .role-agent-shell .order-modal,
    .role-agent-shell .agent-modal {
        width: 100%;
        max-height: 88vh;
        border-radius: 12px 12px 0 0;
    }
    .role-agent-shell input,
    .role-agent-shell select,
    .role-agent-shell textarea {
        font-size: 16px;
    }
    .role-agent-shell button,
    .role-agent-shell .button {
        min-height: 44px;
    }
    .main { padding: 16px; }
    .role-agent-shell .main {
        padding: 16px 12px 18px;
    }
}

