* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.theme-body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.5;
    min-height: 100vh;
}

/* 全屏背景动画 */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}

body.app-body {
    background: transparent;
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

body.login-body {
    background: transparent;
    overflow: hidden;
}

html:has(body.login-body) {
    overflow: hidden;
}

.container-login {
    max-width: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.login-scene {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* 1920×1080 画布容器，自动缩放适配屏幕 */
.tank-canvas-wrapper {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: #111;
}

.tank-canvas-wrapper.tank-spectator::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: 2;
}

.tank-canvas-fullscreen {
    position: relative;
    display: block;
    pointer-events: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.login-scene-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

.login-scene-inner {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.login-scene-inner .login-card {
    pointer-events: auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* 坦克大战 HUD */
.tank-hud {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 5;
    max-width: calc(100vw - 1.5rem);
    font-family: "Courier New", Consolas, monospace;
    pointer-events: auto;
}

.tank-hud-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding: 0.45rem 0.75rem;
    background: rgba(0, 0, 0, 0.82);
    border: 2px solid #444;
    border-radius: 4px;
}

.tank-hud-title {
    color: #f0c000;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.tank-map-name {
    color: #aaa;
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid #555;
    border-radius: 3px;
}

.tank-hud-hint {
    color: #888;
    font-size: 0.68rem;
}

.tank-score {
    color: #f0c000;
    font-size: 0.8rem;
    font-weight: 700;
}

/* 右上角聊天框 — 半透明毛玻璃 */
.tank-chat {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    width: 280px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 30, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    pointer-events: auto;
    font-family: "Courier New", Consolas, monospace;
}

.tank-chat-header {
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f0c000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.06em;
}

.tank-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem 0.55rem;
    min-height: 120px;
    max-height: 220px;
    font-size: 0.72rem;
    line-height: 1.45;
}

.tank-chat-msg {
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.tank-chat-name {
    color: #5ec8ff;
    font-weight: 700;
}

.tank-chat-text {
    color: rgba(255, 255, 255, 0.85);
}

.tank-chat-input {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: #eee;
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
    font-family: inherit;
    outline: none;
}

.tank-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* 开始游戏 — 登录框下方悬浮，不占用登录框内部 */
.tank-start-btn-wrap {
    position: fixed;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
}

.tank-start-btn-wrap .btn-start-game {
    pointer-events: auto;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.btn-start-game {
    min-width: 10rem;
    padding: 0.68rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #1a1a1a;
    background: linear-gradient(180deg, #f0c000 0%, #d4a800 100%);
    border: 2px solid #a07800;
    border-radius: 4px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

.btn-start-game.hidden {
    display: none;
}

.btn-start-game:hover {
    filter: brightness(1.08);
}

.btn-start-game:active {
    transform: scale(0.98);
}

.btn-start-game:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* 胜利提示（备用 HTML 层） */
.tank-victory {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    padding: 1rem 2rem;
    font-family: "Courier New", Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f0c000;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #f0c000;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.tank-victory.visible {
    opacity: 1;
}

@media (max-width: 640px) {
    .tank-hud-hint {
        display: none;
    }

    .tank-hud {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
    }

    .tank-chat {
        top: auto;
        bottom: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-height: 200px;
    }

    .tank-chat-messages {
        max-height: 100px;
        min-height: 60px;
    }
}

.login-card {
    width: 520px;
    max-width: none;
}

.login-card-glass {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 1.15rem 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-card-glass .login-brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: #1a1a1a;
    font-size: 1.28rem;
    line-height: 1.22;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.login-brand-favicon {
    width: calc(1.22em * 2);
    height: calc(1.22em * 2);
    flex-shrink: 0;
    object-fit: contain;
}

.login-brand-text {
    flex: 0 1 auto;
    text-align: left;
}

.btn-login {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
    margin-top: 0.55rem;
}

.login-card-glass .form label {
    font-size: 0.78rem;
    margin: 0.5rem 0 0.22rem;
}

.login-card-glass input {
    padding: 0.48rem 0.65rem;
    font-size: 0.88rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: rgba(0, 0, 0, 0.35);
    background: color-mix(in srgb, var(--theme-nav) 88%, transparent);
    color: var(--theme-text);
    flex-wrap: wrap;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
}

.brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    display: inline-flex;
    opacity: 0.9;
}

.brand-icon .sketch-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.sketch-icon {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

.sketch-icon-sm {
    width: 0.95rem;
    height: 0.95rem;
}

.nav-sketch {
    display: inline-flex;
    margin-right: 0.35rem;
    opacity: 0.92;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.page-title-inline {
    margin-bottom: 0;
}

.page-title-icon {
    display: inline-flex;
    color: var(--theme-accent);
}

.page-title-icon .sketch-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.pagination-deco {
    display: inline-flex;
    color: var(--theme-accent);
    opacity: 0.75;
}

.empty-state {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: inherit;
    opacity: 0.75;
    font-size: 0.9rem;
}

.empty-state-icon {
    display: inline-flex;
    color: var(--theme-accent);
}

.empty-state-icon .sketch-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.version-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.88rem;
}

.version-status-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.version-status-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    font-weight: 600;
    color: var(--theme-accent);
}

.download-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.download-dot-ok {
    background: #43a047;
}

.download-dot-missing {
    background: #fbc02d;
}

.col-sync {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.btn-logout {
    color: var(--theme-text);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    opacity: 0.9;
}

.btn-logout:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: color-mix(in srgb, var(--theme-nav) 85%, transparent);
    padding: 0 1rem 0.5rem;
    border-bottom: 2px solid var(--theme-accent);
    backdrop-filter: blur(8px);
}

.nav-item {
    display: inline-flex;
    align-items: center;
    color: var(--theme-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px 6px 0 0;
    opacity: 0.85;
}

.nav-item:hover,
.nav-item.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.93);
    background: color-mix(in srgb, var(--theme-card-bg) 93%, transparent);
    color: var(--theme-card-text);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
}

.card-narrow {
    max-width: 420px;
    margin: 3rem auto;
}

.login-card h1 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--theme-card-text);
}

.subtitle, .note {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.75rem 0 0.3rem;
}

.form label:first-child {
    margin-top: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #1a1a1a;
}

.project-select {
    margin-bottom: 0.35rem;
}

.path-input {
    font-family: Consolas, monospace;
}

input:focus {
    outline: 2px solid var(--theme-accent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 1rem;
    align-items: end;
}

.form-actions .btn-primary {
    width: auto;
    min-width: 120px;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
}

.btn-primary {
    background: var(--theme-accent);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: #e0e4ec;
    color: #333;
    margin-top: 0;
}

.btn-download {
    background: #27ae60;
    color: #fff;
    margin-top: 0;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.flash-list {
    list-style: none;
    margin-bottom: 1rem;
}

.flash {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-warning { background: #fff3cd; color: #856404; }
.flash-info { background: #d1ecf1; color: #0c5460; }

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.5rem 0.45rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-table th {
    font-weight: 600;
}

.mono {
    font-family: Consolas, monospace;
    font-size: 0.78rem;
}

.data-table tr.status-green .days-left { color: #1e7e34; font-weight: 600; }
.data-table tr.status-yellow .days-left { color: #b8860b; font-weight: 600; }
.data-table tr.status-red .days-left { color: #c0392b; font-weight: 600; }
.data-table tr.status-green { background: rgba(40, 167, 69, 0.08); }
.data-table tr.status-yellow { background: rgba(255, 193, 7, 0.12); }
.data-table tr.status-red { background: rgba(220, 53, 69, 0.1); }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.badge-sample {
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.badge-sample.status-green { background: #d4edda; color: #155724; }
.badge-sample.status-yellow { background: #fff3cd; color: #856404; }
.badge-sample.status-red { background: #f8d7da; color: #721c24; }

.btn-link {
    color: var(--theme-accent);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    text-decoration: underline;
}

.btn-link.danger {
    color: #c0392b;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.page-link {
    color: var(--theme-accent);
    text-decoration: none;
    font-weight: 600;
}

.empty {
    color: inherit;
    opacity: 0.7;
    font-size: 0.9rem;
}

.license-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.license-code {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem;
    background: #f5f5f5;
    border-radius: 6px;
    word-break: break-all;
    font-size: 0.82rem;
}

.result-box {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.copy-tip {
    font-size: 0.8rem;
    color: #27ae60;
    margin-top: 0.4rem;
}

.inline-form {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
}

.inline-form input {
    margin-bottom: 0.35rem;
}

code {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.85em;
}

details summary {
    cursor: pointer;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.2rem;
}

/* 系统设置：API 文档 */
.api-docs {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.api-docs-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.api-docs-intro {
    margin-bottom: 1rem;
}

.api-block {
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.api-block h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.api-desc {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

.api-label {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: none;
}

.api-code {
    margin: 0 0 0.5rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1.45;
    background: #f4f6f8;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.api-param-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}

.api-param-table th,
.api-param-table td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.api-param-table th {
    font-weight: 600;
    color: #555;
    background: rgba(0, 0, 0, 0.03);
}

.api-tips {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

.api-docs-foot {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.api-docs-page {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* 在线用户 */
.online-users {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-right: 0.75rem;
    max-width: 420px;
}

.online-label {
    font-size: 0.75rem;
    opacity: 0.85;
}

.online-user-chip {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    font-size: 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.online-user-chip.online-self {
    background: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

/* 文件下载 */
.downloads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.downloads-toolbar {
    margin-bottom: 1rem;
}

.search-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: #555;
}

.search-input {
    width: 100%;
    max-width: 420px;
}

.dropzone {
    margin: 0.75rem 0 1rem;
    padding: 2rem 1rem;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: border-color 0.15s, background 0.15s;
}

.dropzone-active {
    border-color: var(--theme-accent);
    background: rgba(30, 136, 229, 0.08);
}

.dropzone-hint {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.dropzone-filename {
    margin: 0.5rem 0 0;
    font-weight: 600;
    color: var(--theme-card-text);
    word-break: break-all;
}

.upload-modal-card {
    max-width: 640px;
}

.upload-success {
    margin-top: 0.75rem;
    color: #27ae60;
    font-size: 0.9rem;
}

.batch-file-list-wrap {
    margin-bottom: 1rem;
}

.batch-file-table {
    font-size: 0.85rem;
}

.batch-file-table .path-input {
    width: 100%;
    min-width: 120px;
}

.batch-name-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-error {
    margin-top: 0.75rem;
    color: #c0392b;
    font-size: 0.9rem;
}

.required {
    color: #c0392b;
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
    border: 1px solid #ced4da;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 生成授权：确认对话框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.45);
}

.modal-overlay[hidden] {
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    background: #fff;
    color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.modal-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: #1a1a1a;
}

.modal-lead {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

.confirm-summary {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #eef1f4;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.confirm-summary dt {
    margin: 0;
    font-weight: 600;
    color: #444;
}

.confirm-summary dd {
    margin: 0;
    word-break: break-all;
    color: #1a1a1a;
}

.confirm-summary dd.mono {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.85rem;
    color: #0d47a1;
}

.confirm-tips {
    margin: 0 0 1.25rem;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.65;
}

.confirm-tips li {
    margin-bottom: 0.35rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* 授权记录：已禁用（操作列不划线，便于点击「启用」） */
tr.row-disabled td:not(.ops-cell) {
    text-decoration: line-through;
    opacity: 0.65;
}

tr.row-disabled .ops-cell {
    text-decoration: none;
    opacity: 1;
}

tr.row-disabled .ops-cell .btn-enable,
tr.row-disabled .ops-cell .inline-toggle button {
    text-decoration: none;
}

tr.row-disabled .auth-status-cell {
    text-decoration: none;
    opacity: 1;
}

.auth-delivered {
    color: #1e7e34;
    font-weight: 600;
    cursor: help;
    border-bottom: 1px dotted #1e7e34;
}

.auth-pending {
    color: #888;
}

.badge-sample.auth-delivered-sample {
    background: #d4edda;
    color: #1e7e34;
}

.user-bar .btn-account {
    margin-right: 0.75rem;
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.9;
    text-decoration: none;
}

.user-bar .btn-account:hover {
    opacity: 1;
    text-decoration: underline;
}

.role-badge.admin {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #343a40;
    color: #fff;
    border-radius: 4px;
}

.badge-sample.row-disabled-sample {
    background: #e9ecef;
    color: #6c757d;
    text-decoration: line-through;
}

.ops-cell {
    white-space: nowrap;
}

.ops-cell .btn-link,
.ops-cell .inline-toggle {
    display: inline;
    margin-right: 0.5rem;
}

.inline-toggle {
    display: inline;
    margin: 0;
    padding: 0;
}

.btn-disable {
    color: #c0392b;
}

.btn-enable {
    color: #27ae60;
}

.disabled-text {
    color: #999;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* 版本列表分区 */
.version-section {
    margin-top: 0.5rem;
}

.version-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--theme-accent);
    color: var(--theme-card-text);
}

.version-divider {
    border: none;
    border-top: 3px solid var(--theme-accent);
    margin: 1.5rem 0;
    opacity: 0.5;
}

.category-divider {
    border: none;
    border-top: 2px solid var(--theme-accent);
    margin: 1.5rem 0;
    opacity: 0.45;
}

.category-group {
    margin-bottom: 1rem;
}

.category-header {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--theme-card-text);
    background: rgba(0, 0, 0, 0.06);
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    border-left: 5px solid var(--theme-accent);
}

.folder-group {
    margin-bottom: 0.85rem;
    margin-left: 0.5rem;
}

.folder-group-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-accent);
    background: rgba(0, 0, 0, 0.03);
    padding: 0.4rem 0.75rem;
    border-radius: 4px 4px 0 0;
    border-left: 3px solid var(--theme-accent);
    opacity: 0.95;
}

.folder-files {
    margin-bottom: 0;
}

.folder-files .file-name-cell {
    padding-left: 1.25rem;
    width: 55%;
}

.folder-files .version-cell {
    width: 45%;
    white-space: nowrap;
}

.version-table {
    margin-bottom: 0.25rem;
}
