/* 爆枪英雄 — 编辑器内容与弹窗样式 */

.hidden {
    display: none !important;
}

.color-tag {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.color-white { background: #f1f5f9; color: #94a3b8; }
.color-green { background: #dcfce7; color: #16a34a; }
.color-blue { background: #dbeafe; color: #2563eb; }
.color-purple { background: #f3e8ff; color: #9333ea; }
.color-orange { background: #fff7ed; color: #ea580c; }
.color-red { background: #fef2f2; color: #dc2626; }
.color-black { background: #1e293b; color: #e2e8f0; }
.color-darkgold { background: #451a03; color: #d97706; }
.color-purgold { background: #4c1d95; color: #c084fc; }
.color-yagold { background: #0c4a6e; color: #38bdf8; }

.save-editor-body .ig,
.save-editor-body .input-group {
    margin-bottom: 1rem;
}

.save-editor-body .ig label,
.save-editor-body .input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.save-editor-body .btn-d {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.save-editor-body .btn-d:hover {
    background: #fee2e2;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-glow);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: bqSpin 0.7s linear infinite;
    flex-shrink: 0;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner-muted {
    border-color: var(--bg-input);
    border-top-color: var(--text-muted);
}

.loading-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg, 12px);
}

.tbl-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.tbl thead th {
    padding: 10px 14px;
    background: var(--bg-input);
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tbl tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: var(--text);
    vertical-align: middle;
}

.tbl tbody tr:last-child td {
    border-bottom: none;
}

.tbl tbody tr:hover td {
    background: var(--bg-input);
}

.tbl tbody tr.sel td {
    background: var(--primary-bg);
}

.grp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
    padding: 0 1.75rem;
}

.grp-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s;
}

.grp-btn:hover {
    color: var(--primary);
}

.grp-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg-card);
}

.sub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0.5rem 1.75rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.sub-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s;
}

.sub-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sub-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.equip-tab {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s;
}

.equip-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.equip-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.panel {
    display: none;
}

.panel.active {
    display: block;
    padding: 1.25rem 1.75rem;
    max-height: calc(100vh - 340px);
    overflow-y: auto;
}

/* 侧边栏右侧内容区：由 .bq-content 统一滚动并撑满高度 */
.bq-content .panel,
.bq-content .panel.active {
    max-height: none;
    overflow: visible;
    padding: 0;
    min-height: 100%;
}

.info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.info-bar-left {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.info-bar-left strong {
    color: var(--text);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-item input,
.info-item select {
    padding: 0.45rem 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.info-item input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.top-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.top-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: pointer;
}

.top-label {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.top-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-mask.open {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 560px;
    max-width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.modal-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-hdr h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-input);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.15s;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.edit-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.edit-field input,
.edit-field select {
    padding: 0.4rem 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.edit-field input:focus,
.edit-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.edit-field input[type="checkbox"] {
    width: auto;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.search-bar input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.82rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.search-bar select {
    padding: 0.4rem 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.78rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.tool-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 0;
}

.tool-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: rgba(5, 150, 105, 0.08);
    color: #059669;
}

.badge-muted {
    background: var(--bg-input);
    color: var(--text-muted);
}

.badge-warn {
    background: #fff7ed;
    color: #d97706;
}

.section-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-hdr h3 {
    font-size: 0.9rem;
    font-weight: 600;
}

.section-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.item-picker {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
}

.item-picker-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
}

.item-picker-search input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.82rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
}

.item-picker-search input:focus {
    border-color: var(--primary);
}

.item-picker-list {
    max-height: 220px;
    overflow-y: auto;
}

.item-picker-row {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.item-picker-row:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.item-picker-row.selected {
    background: var(--primary);
    color: #fff;
}

.item-picker-code {
    font-size: 0.72rem;
    opacity: 0.6;
    font-family: monospace;
}

.more-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.85rem;
}

.more-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.more-item-sel {
    border-color: var(--primary) !important;
    background: var(--primary-bg) !important;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.times-badge {
    color: var(--primary);
    font-weight: 600;
}

.days-new { color: #059669; font-weight: 600; }
.days-mid { color: #d97706; font-weight: 600; }
.days-old { color: #dc2626; font-weight: 600; }
