* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --orange: #ff6a00;
    --orange-dark: #e85f00;
    --text: #333;
    --muted: #8a8a8a;
    --line: #ececec;
    --bg: #f4f5f7;
    --side: 220px;
    --header: 56px;
}

body.login-body,
body.wb-body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff8a1f, #ff5a00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-mark.sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 7px;
}

/* Login */
.login-body {
    min-height: 100vh;
    background: #fff;
}

.login-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
}

.login-visual {
    background: linear-gradient(160deg, #fff4ea 0%, #ffe1c7 45%, #ffd0a8 100%);
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 64px;
}

.login-brand-name {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.login-brand-sub {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #a05a28;
}

.login-visual h1 {
    font-size: 36px;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 16px;
}

.login-visual p {
    color: #7a5a42;
    font-size: 15px;
    margin-bottom: 40px;
}

.login-preview-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(255, 106, 0, 0.12);
}

.login-preview-bar {
    height: 10px;
    width: 120px;
    background: var(--orange);
    border-radius: 6px;
    margin-bottom: 14px;
}

.login-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.login-preview-grid span {
    height: 78px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffd7b0, #ffb27a);
}

.login-preview-grid span:nth-child(2) { background: linear-gradient(135deg, #ffc48a, #ff8d3a); }
.login-preview-grid span:nth-child(3) { background: linear-gradient(135deg, #ffe0c2, #ffc090); }
.login-preview-grid span:nth-child(4) { background: linear-gradient(135deg, #ffb56a, #ff7a1a); }

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-card-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-card-hint {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 28px;
}

.login-field {
    display: block;
    margin-bottom: 18px;
}

.login-field span {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: #555;
}

.login-field input {
    width: 100%;
    height: 44px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}

.login-field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}

.login-error {
    min-height: 20px;
    color: #e23c3c;
    font-size: 13px;
    margin-bottom: 8px;
}

.login-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.login-btn:hover {
    background: var(--orange-dark);
}

/* Workbench */
.wb-body {
    background: var(--bg);
    min-height: 100vh;
}

.wb-header {
    height: var(--header);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 16px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.wb-header-left,
.wb-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-workspace {
    font-size: 16px;
    color: #444;
}

.wb-top-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    padding: 0 6px;
    white-space: nowrap;
}

.wb-top-link:hover {
    color: var(--orange);
}

.wb-icon-btn {
    border: none;
    background: transparent;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
    font-size: 13px;
    padding: 4px 6px;
}

.wb-dl-entry {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    cursor: pointer;
    margin-left: 4px;
}

.wb-dl-entry:hover {
    background: #f4f4f4;
    color: var(--orange);
}

.wb-dl-entry.busy svg {
    animation: dl-entry-pulse 1.1s ease-in-out infinite;
}

@keyframes dl-entry-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.wb-dl-count {
    position: absolute;
    top: -1px;
    right: -1px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
}

.wb-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4d4f;
    color: #fff;
    font-style: normal;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.wb-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    position: relative;
    cursor: pointer;
    padding: 4px 0 4px 8px;
}

.wb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffd9b8;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.wb-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.wb-user-meta strong {
    font-size: 13px;
}

.wb-user-meta em {
    font-size: 11px;
    color: var(--muted);
    font-style: normal;
}

.wb-user-drop {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.wb-user.open .wb-user-drop {
    display: block;
}

.wb-user-drop a,
.wb-user-drop button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    cursor: pointer;
}

.wb-user-drop a:hover,
.wb-user-drop button:hover {
    background: #fff7f0;
    color: var(--orange);
}

.wb-shell {
    display: flex;
    min-height: calc(100vh - var(--header));
}

.wb-side {
    width: var(--side);
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.wb-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 8px;
    font-size: 13px;
    color: #888;
}

.wb-side-head button {
    border: none;
    background: none;
    color: var(--orange);
    cursor: pointer;
    font-size: 12px;
}

.wb-nav {
    padding: 4px 8px 16px;
    flex: 1;
}

.wb-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    text-decoration: none;
}

a.wb-nav-item:hover:not(.active) {
    background: #f7f7f7;
}

.wb-nav-item.active {
    color: var(--orange);
    background: #fff4eb;
    font-weight: 600;
}

.wb-nav-item:hover:not(.active) {
    background: #f7f7f7;
}

.wb-sub {
    padding: 0 10px 8px 34px;
}

.wb-sub a {
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    line-height: 2;
}

.wb-sub a:hover {
    color: var(--orange);
}

.wb-nav-group {
    margin: 14px 10px 6px;
    font-size: 12px;
    color: #aaa;
}

.wb-storage {
    padding: 12px 16px 16px;
    font-size: 12px;
    color: #888;
    border-top: 1px solid var(--line);
}

.wb-storage-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}

.wb-storage-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ffb347, var(--orange));
}

.wb-storage a {
    color: var(--orange);
    text-decoration: none;
}

.wb-main {
    flex: 1;
    padding: 16px 20px 40px;
    min-width: 0;
}

.wb-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.wb-create {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange);
    color: #fff;
    text-decoration: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 14px;
    position: relative;
    margin-right: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.wb-create span {
    font-size: 18px;
    line-height: 1;
}

.wb-new,
.wb-dot-new {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    border-radius: 8px;
    padding: 1px 5px;
    line-height: 1.3;
}

.wb-action {
    width: 84px;
    border: none;
    background: transparent;
    color: #555;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    position: relative;
    padding: 4px 0;
}

.wb-action:hover {
    color: var(--orange);
}

.wb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.wb-toolbar-left,
.wb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wb-select,
.wb-sort,
.wb-view-btn {
    border: none;
    background: none;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.wb-sort-wrap {
    position: relative;
}

.wb-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wb-sort-wrap.open .wb-sort {
    color: var(--orange);
}

.wb-sort-drop {
    display: none;
    position: absolute;
    right: 0;
    top: 28px;
    min-width: 132px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 10;
}

.wb-sort-wrap.open .wb-sort-drop {
    display: block;
}

.wb-sort-drop button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 9px 14px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}

.wb-sort-drop button:hover,
.wb-sort-drop button.active {
    background: #fff7f0;
    color: var(--orange);
}

.wb-view-switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wb-filter-link {
    border: none;
    background: none;
    color: var(--orange);
    font-size: 13px;
    cursor: pointer;
}

.wb-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 0 12px;
    height: 32px;
    color: #bbb;
}

.wb-search input {
    border: none;
    outline: none;
    width: 160px;
    font-size: 13px;
    background: transparent;
}

.wb-view-btn.active {
    color: var(--orange);
}

.wb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.wb-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: block;
}

.wb-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.wb-cover {
    position: relative;
    height: 148px;
    background: #ddd;
}

.wb-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wb-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 90, 200, 0.28);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wb-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.wb-card-body {
    padding: 10px 12px 14px;
}

.wb-card-title {
    font-size: 13px;
    line-height: 1.45;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wb-card-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.wb-help {
    position: fixed;
    right: 0;
    top: 46%;
    writing-mode: vertical-rl;
    background: #2f80ed;
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 14px 8px;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 2px;
}

.wb-card.hidden {
    display: none;
}

.wb-grid.compact {
    grid-template-columns: 1fr;
    gap: 8px;
}

.wb-grid.compact .wb-cover {
    display: none;
}

.wb-grid.compact .wb-card {
    box-shadow: none;
    border: 1px solid #eee;
}

.wb-grid.compact .wb-card:hover {
    transform: none;
    border-color: #ffd0a8;
    box-shadow: none;
}

.wb-grid.compact .wb-card-body {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wb-grid.compact .wb-card-title {
    height: auto;
    -webkit-line-clamp: 1;
    flex: 1;
    min-width: 0;
}

.wb-grid.compact .wb-card-meta {
    margin-top: 0;
    flex-shrink: 0;
}

.wb-card-usage {
    margin-top: 4px;
    font-size: 12px;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wb-grid.compact .wb-card-usage {
    margin-top: 0;
    flex-shrink: 0;
}

@media (max-width: 1280px) {
    .wb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .wb-top-link {
        display: none;
    }
}

@media (max-width: 900px) {
    .login-wrap {
        grid-template-columns: 1fr;
    }
    .login-visual {
        display: none;
    }
    .wb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wb-side {
        display: none;
    }
}

/* 创建相册弹窗 */
.wb-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.wb-modal-mask.open {
    display: flex;
}

.wb-modal {
    width: 440px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.wb-modal-head {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}

.wb-modal-body {
    padding: 20px;
}

.wb-modal-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.wb-modal-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.wb-modal-input:focus {
    border-color: var(--orange);
}

#vlStatus.live {
    color: #ff4d4f;
}

#vlStatus.live::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4f;
    margin-right: 6px;
}

input[readonly].wb-modal-input {
    background: #f7f7f7;
    color: #555;
}

select.wb-modal-input {
    appearance: auto;
}

.wb-modal-body .wb-modal-label {
    margin-top: 14px;
}

.wb-modal-body .wb-modal-label:first-child {
    margin-top: 0;
}





.wb-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.wb-btn {
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.wb-btn.primary {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.wb-btn.primary:hover {
    background: var(--orange-dark);
}

.wb-btn.plain:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.wb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dl-modal {
    width: 470px;
}

.dl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dl-album {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}

.dl-variants {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dl-variant {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.dl-variant strong {
    font-size: 14px;
    color: var(--text);
}

.dl-variant span {
    font-size: 12px;
    color: var(--muted);
}

.dl-variant:hover {
    border-color: var(--orange);
}

.dl-variant.active {
    border-color: var(--orange);
    background: #fff7f1;
    box-shadow: inset 0 0 0 1px var(--orange);
}

.dl-progress {
    margin-top: 16px;
}

.dl-status-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 13px;
}

.dl-status {
    font-weight: 500;
    color: var(--text);
    flex: 1;
    margin-right: 8px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-countdown {
    color: var(--orange);
    font-variant-numeric: tabular-nums;
}

.dl-bar {
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: #f1f2f5;
    overflow: hidden;
}

.dl-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--orange);
    transition: width 0.3s ease;
}

.dl-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.dl-packages {
    margin-top: 16px;
}

.dl-packages-title {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.dl-package-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-pkg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.dl-pkg:hover {
    border-color: var(--orange);
}

.dl-pkg.checked {
    border-color: var(--orange);
    background: #fff7f1;
    box-shadow: inset 0 0 0 1px var(--orange);
}

.dl-pkg.running {
    cursor: default;
    background: #fafafa;
    border-style: dashed;
}

.dl-pkg.running:hover {
    border-color: var(--line);
}

.dl-pkg.running .dl-pkg-box {
    opacity: .35;
}

.dl-pkg input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.dl-pkg-box {
    position: relative;
    flex: none;
    width: 16px;
    height: 16px;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    background: #fff;
}

.dl-pkg.checked .dl-pkg-box {
    border-color: var(--orange);
    background: var(--orange);
}

.dl-pkg.checked .dl-pkg-box::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dl-pkg-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dl-pkg-name {
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-pkg-meta {
    font-size: 12px;
    color: var(--muted);
}

.dl-error {
    margin-top: 10px;
    font-size: 12px;
    color: #d93025;
}

.dl-error:empty {
    display: none;
}

.dl-modal .wb-modal-actions {
    margin-top: 16px;
}

/* 相册封面悬停操作 */
.wb-cover-actions {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
}

.wb-card:hover .wb-cover-actions {
    display: flex;
}

.wb-cover-btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.wb-cover-btn:hover {
    background: var(--orange);
    color: #fff;
}

.wb-cover-btn.danger:hover {
    background: #e03131;
}

/* 管理员管理 */
.mg-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.mg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.mg-head h1 {
    font-size: 22px;
    margin: 0 0 8px;
}

.mg-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.mg-list {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.mg-loading {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.mg-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.mg-row:last-child {
    border-bottom: none;
}

.mg-row.disabled {
    opacity: 0.6;
}

.mg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4c6ef5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.mg-avatar.super {
    background: #fff4e6;
    color: #f76707;
}

.mg-info {
    flex: 1;
    min-width: 0;
}

.mg-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.mg-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f1f3f5;
    color: #666;
}

.mg-tag.super {
    background: #fff4e6;
    color: #f76707;
}

.mg-tag.me {
    background: #e7f5ff;
    color: #1c7ed6;
}

.mg-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.mg-perms-text {
    margin-top: 6px;
    font-size: 12px;
    color: #495057;
}

.mg-perms-text.muted {
    color: #adb5bd;
}

.mg-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    flex-shrink: 0;
}

.mg-status.on {
    background: #ebfbee;
    color: #2f9e44;
}

.mg-status.off {
    background: #f1f3f5;
    color: #868e96;
}

.mg-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mg-btn {
    height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: #444;
    font-size: 13px;
    cursor: pointer;
}

.mg-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.mg-btn.danger:hover {
    border-color: #e03131;
    color: #e03131;
}

.mg-modal .wb-modal-input {
    margin-bottom: 14px;
}

.mg-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.mg-perm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.mg-perm input {
    accent-color: var(--orange);
}

.mg-perm:has(input:checked) {
    border-color: var(--orange);
    background: #fff4ec;
    color: var(--orange-dark);
}

.mg-enable {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}

.mg-enable input {
    accent-color: var(--orange);
}

.mg-error {
    min-height: 18px;
    margin-top: 10px;
    font-size: 12px;
    color: #e03131;
}

.mg-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 10px);
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 2000;
}

.mg-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 需求帮助弹窗 */
.help-modal {
    width: 420px;
}

.help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.help-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 2px;
}

.help-close:hover {
    color: #444;
}

.help-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.help-label {
    width: 64px;
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
}

.help-value {
    flex: 1;
    font-size: 15px;
    color: var(--text);
    word-break: break-all;
}

.help-value.empty {
    color: #adb5bd;
    font-weight: 400;
    font-size: 13px;
}

.help-copy {
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--orange);
    border-radius: 6px;
    background: #fff;
    color: var(--orange);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.help-copy:hover {
    background: var(--orange);
    color: #fff;
}

.help-tip {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.help-edit {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-error {
    min-height: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: #e03131;
}

.help-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 10px);
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 2000;
}

.help-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 流量与容量 */
.as-main {
    background: var(--bg);
}

.as-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.as-head h1 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.as-head p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.as-head-meta {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.as-claim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    background: linear-gradient(120deg, #fff4ea, #ffe6d0);
    border: 1px solid #ffd9bb;
}

.as-claim-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.as-claim-text strong {
    font-size: 15px;
    color: #a34900;
}

.as-claim-text span {
    font-size: 12px;
    color: #b0723f;
}

.as-claim-btn {
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.as-claim-btn:hover:not(:disabled) {
    background: var(--orange-dark);
}

.as-claim-btn:disabled {
    background: #f1c9a9;
    cursor: default;
}

.as-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.as-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
}

.as-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.as-card-head h2 {
    font-size: 15px;
    font-weight: 600;
}

.as-card-head p {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}

.as-ic {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #fff2e8;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.as-balance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 16px 0 10px;
}

.as-balance strong {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.as-balance span {
    font-size: 12px;
    color: var(--muted);
}

.as-meter {
    height: 8px;
    border-radius: 4px;
    background: #f0f0f0;
    overflow: hidden;
}

.as-meter i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ffb347, var(--orange));
    transition: width 0.3s;
}

.as-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.as-split > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fafafa;
    border-radius: 8px;
    padding: 10px 12px;
}

.as-split span {
    font-size: 12px;
    color: var(--muted);
}

.as-split strong {
    font-size: 15px;
    font-weight: 600;
}

.as-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--muted);
}

.as-foot strong {
    font-size: 13px;
    color: #444;
    font-weight: 600;
}

.as-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.as-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.as-panel-head h2 {
    font-size: 15px;
    font-weight: 600;
}

.as-panel-head span {
    font-size: 12px;
    color: var(--muted);
}

.as-table-wrap {
    overflow-x: auto;
}

.as-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 13px;
}

.as-table th {
    text-align: left;
    font-weight: 500;
    color: var(--muted);
    background: #fafafa;
    padding: 10px 18px;
    white-space: nowrap;
}

.as-table td {
    padding: 11px 18px;
    border-top: 1px solid #f4f4f4;
    vertical-align: middle;
    white-space: nowrap;
}

.as-table tbody tr:hover {
    background: #fffaf5;
}

.as-table .as-num {
    text-align: right;
    white-space: nowrap;
}

.as-time {
    color: var(--muted);
    white-space: nowrap;
}

.as-detail {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.as-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    white-space: nowrap;
    background: #eef4ff;
    color: #3b6fd8;
}

.as-tag.capacity {
    background: #eefaf1;
    color: #2f9d55;
}

.as-source {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    background: #f2f2f2;
    color: #777;
}

.as-source.gift {
    background: #fff1e6;
    color: var(--orange);
}

.as-empty td {
    padding: 36px 18px;
    text-align: center;
    color: var(--muted);
}

.as-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 10px);
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 2000;
}

.as-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .as-grid {
        grid-template-columns: 1fr;
    }
    .as-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
