/* ===== 出货设置页 ===== */
.settings-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

.settings-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.settings-title { margin: 0 0 4px; font-size: 1.4rem; }
.settings-subtitle { margin: 0; font-size: 0.85rem; color: #6b7280; }
.settings-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.settings-status {
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    font-size: 12px;
    color: #93c5fd;
}
.save-hint {
    font-size: 11px;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.25s;
}
.save-hint.visible { opacity: 1; }

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.settings-tab-btn {
    flex: 1;
    max-width: 200px;
    padding: 10px 16px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #151819;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
}
.settings-tab-btn.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    color: #e2e8f0;
}

.settings-panel { margin-bottom: 24px; }

.rates-card {
    background: rgba(21, 24, 25, 0.9);
    border: 1px solid #323436;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
}

.settings-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-reset {
    padding: 10px 20px;
    border: 1px solid #4b5563;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
}
.btn-reset:hover { border-color: #6b7280; color: #e2e8f0; }
.btn-primary-link {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    background: #38be75;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}
.btn-primary-link:hover { filter: brightness(1.1); }
.btn-text {
    border: none;
    background: none;
    color: #60a5fa;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* 指定出货 */
.pick-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.pick-search {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid #3f4a54;
    border-radius: 8px;
    background: #0f1318;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
}
.pick-search:focus { border-color: #3b82f6; }
.pick-count { font-size: 13px; color: #9ca3af; }

.pick-selected-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-height: 88px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(21, 24, 25, 0.9);
    border: 1px solid #323436;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}
.pick-order-hint {
    margin: 0 0 12px;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}
.pick-order-hint.hidden { display: none; }

.pick-selected-card {
    position: relative;
    flex: 0 0 64px;
    width: 64px;
    text-align: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.pick-selected-card:active { cursor: grabbing; }
.pick-selected-card.is-dragging-source { opacity: 0.45; }
.pick-selected-card.drop-target img {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4);
}
.pick-order-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 8px;
    background: rgba(15, 19, 24, 0.85);
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-size: 9px;
    line-height: 14px;
    font-weight: 700;
}
.pick-selected-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #1a1f24;
    border: 2px solid #3b82f6;
    border-radius: 6px;
}
.pick-empty { margin: 0; width: 100%; text-align: center; font-size: 13px; color: #6b7280; line-height: 52px; flex: 1; }
.pick-selected-name {
    display: block;
    font-size: 9px;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}
.pick-selected-remove {
    position: absolute;
    top: -4px;
    right: 0;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    position: sticky;
    top: 48px;
    z-index: 10;
    padding: 8px 0;
    background: rgba(10, 14, 18, 0.92);
    backdrop-filter: blur(6px);
}
.cat-nav-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    transition: filter 0.15s, box-shadow 0.15s;
}
.cat-nav-btn.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
    filter: brightness(1.15);
}
.cat-nav-btn.cat-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.cat-nav-btn.cat-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.cat-nav-btn.cat-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }
.cat-nav-btn.cat-yellow { background: rgba(234, 179, 8, 0.15); color: #facc15; border-color: rgba(234, 179, 8, 0.3); }
.cat-nav-btn.cat-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.cat-nav-btn.cat-key { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border-color: rgba(239, 68, 68, 0.25); }

.pick-grid-panel { min-height: 120px; }
.pick-cat-empty { margin: 24px 0; font-size: 13px; color: #6b7280; text-align: center; }

.loot-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}

.loot-pick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px 6px;
    border: 2px solid #2a3238;
    border-radius: 8px;
    background: #151a1f;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.loot-pick-card:hover { border-color: #4b5563; background: #1a2230; }
.loot-pick-card.is-selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}
.loot-pick-check {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    opacity: 0;
}
.loot-pick-card.is-selected .loot-pick-check { opacity: 1; }
.loot-pick-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
}
.loot-pick-name {
    margin-top: 6px;
    font-size: 10px;
    color: #cbd5e1;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}
.loot-pick-meta {
    margin-top: 2px;
    font-size: 9px;
    color: #6b7280;
}

@media (max-width: 520px) {
    .loot-pick-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
    .loot-pick-card img { width: 52px; height: 52px; }
}
