/* ===================================
   MINER'S MANIFEST - NEW COLLAPSIBLE PANEL SYSTEM
   Following UI_STYLE_GUIDE.md specifications
   =================================== */

/* === HIDE OLD MINER CLUSTER === */
/* Hide the old miner journal cluster button - we're using the new system now */
.miner-cluster,
#miner-cluster {
    display: none !important;
}

/* === EXPANDED STATE === */
#miners-manifest-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    background-image: linear-gradient(
        to bottom, 
        rgba(40, 30, 20, 0.9),
        rgba(20, 15, 10, 0.9)
    );
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(85, 85, 85, 0.7);
    width: 670px; /* 280px left + 10px gap + 350px right + 30px padding */
    max-height: calc(100vh - 60px);
    transition: all 0.3s ease;
    overflow: hidden;
    user-select: none; /* Prevent text selection during dragging */
}

/* Prevent text selection on all child elements */
#miners-manifest-panel * {
    user-select: none;
}

/* === INLINE NOTIFICATIONS === */
.manifest-notification {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    min-width: 200px;
}

.manifest-notification-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.manifest-notification-error {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.manifest-notification-info {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* === COLLAPSED STATE === */
#miners-manifest-panel.collapsed {
    overflow: hidden !important; /* Force overflow hidden when collapsed */
    padding: 0;
    width: 48px !important; /* Square button like other UI buttons */
    height: 48px !important; /* Square */
    border-radius: 50%; /* Circular button like others */
    background: #6B4625; /* Match other button colors */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide content when collapsed */
#miners-manifest-panel.collapsed #manifest-content {
    display: none;
    user-select: none;
}

/* === TITLE STYLING === */
.manifest-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(85, 85, 85, 0.7);
    padding-bottom: 5px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.manifest-title:hover {
    color: #fff;
}

/* Collapsed button title styling */
#miners-manifest-panel.collapsed .manifest-title {
    margin: 0;
    border-bottom: none;
    padding: 0;
    font-size: 28px; /* Large single glyph */
    color: #F8E7D1; /* Light color like other buttons */
    user-select: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#miners-manifest-panel.collapsed .manifest-title:hover {
    transform: scale(1.1);
}

#miners-manifest-panel.collapsed:hover {
    background-color: #8B5A2B; /* Hover color like other buttons */
}

/* === MANIFEST CONTENT === */
#manifest-content {
    display: flex;
    flex-direction: row;
    gap: 10px;
    max-height: calc(100vh - 240px);
    overflow: visible; /* Allow child scrolling */
}

/* === LEFT COLUMN (Summary, Power, Miners List) === */
.manifest-left-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 280px;
    flex-shrink: 0;
}

/* === RIGHT COLUMN (Detail Card + Inventory) === */
.manifest-right-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 350px;
    flex-shrink: 0;
}


/* === SECTIONS === */
.manifest-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px;
}

.section-header {
    font-size: 11px;
    margin: 0 0 6px 0;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Section header with controls (for sort dropdown, etc.) */
.section-header-with-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.section-header-with-controls .section-header {
    margin: 0;
}

/* Camera focus toggle - matches tier filter style */
.manifest-camera-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-size: 10px;
    color: #aaa;
    user-select: none;
    transition: color 0.2s ease;
}

.manifest-camera-toggle:hover {
    color: #fff;
}

.manifest-camera-toggle input[type="checkbox"] {
    width: 12px;
    height: 12px;
    cursor: pointer;
    margin: 0;
    accent-color: #8B4513; /* Brown mining theme - matches tier filters */
}

/* Muted when unchecked */
.manifest-camera-toggle:has(input[type="checkbox"]:not(:checked)) {
    color: #555;
}

.manifest-camera-toggle:has(input[type="checkbox"]:not(:checked)):hover {
    color: #888;
}

/* Sort dropdown styling */
.manifest-sort-select {
    font-size: 9px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: #aaa;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.manifest-sort-select:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.manifest-sort-select:focus {
    border-color: #8B4513;
    box-shadow: 0 0 4px rgba(139, 69, 19, 0.5);
}

.manifest-sort-select option {
    background: #2a2a2a;
    color: #fff;
}

.manifest-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(85, 85, 85, 0.3);
    margin: 3px 0;
}

/* === GUILD SUMMARY === */
.guild-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guild-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.guild-stat-label {
    font-size: 12px;
    color: #ddd;
    font-weight: 500;
}

.guild-stat-value {
    font-size: 13px;
    color: #fff;
    font-weight: bold;
}

/* === GUILD POWER METERS === */
.manifest-power-meter {
    margin-bottom: 6px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(85, 85, 85, 0.3);
}

.manifest-power-meter:last-child {
    margin-bottom: 0;
}

.manifest-power-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.manifest-power-profession {
    font-size: 11px;
    color: #aaa;
    text-transform: capitalize;
    font-weight: 600;
}

.manifest-power-count {
    font-size: 10px;
    color: #888;
}

.manifest-power-values {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    margin-bottom: 4px;
}

.manifest-power-label {
    color: #999;
}

.manifest-power-used {
    color: #4A90E2;
    font-weight: 600;
}

.manifest-power-used.over-limit {
    color: #E74C3C;
}

.manifest-power-separator {
    color: #666;
}

.manifest-power-total {
    color: #888;
    font-weight: 500;
}

.manifest-power-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.manifest-power-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2 0%, #357ABD 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.manifest-power-fill.over-limit {
    background: linear-gradient(90deg, #E74C3C 0%, #C0392B 100%);
}

/* === MINERS LIST === */
.miners-list-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Don't shrink */
}

.miners-list-section .section-header {
    flex-shrink: 0; /* Header stays visible */
}

#manifest-miners-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    height: 350px;
    max-height: 350px;
    position: relative;
    touch-action: pan-y; /* Enable touch/wheel scrolling */
}

/* Custom scrollbar for miners list */
#manifest-miners-list::-webkit-scrollbar {
    width: 8px;
}

#manifest-miners-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#manifest-miners-list::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

#manifest-miners-list::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

/* === MINER ENTRY === */
.manifest-miner-entry {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(85, 85, 85, 0.4);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.manifest-miner-entry:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateX(-2px);
}

.manifest-miner-entry.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), inset 0 0 15px rgba(255, 215, 0, 0.1);
    animation: camera-focus-pulse 2s ease-in-out infinite;
    position: relative;
}

@keyframes camera-focus-pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), inset 0 0 15px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.2);
    }
}

/* Profession indicator */
.manifest-miner-entry.profession-jeweler {
    border-left: 3px solid #90EE90;
}

.manifest-miner-entry.profession-miner {
    border-left: 3px solid #A0774A;
}

/* Miner header */
.manifest-miner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.manifest-miner-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 160px;
}

.manifest-miner-level {
    font-size: 11px;
    color: #FFD700;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Miner stats */
.manifest-miner-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    font-size: 9px;
    margin-bottom: 4px;
}

.manifest-miner-stat {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.manifest-stat-label {
    color: #999;
    font-weight: 500;
}

.manifest-stat-value {
    color: #fff;
    font-weight: 600;
}

/* Profession indicator */
.manifest-miner-profession {
    font-size: 9px;
    color: #90EE90;
    text-transform: capitalize;
    font-style: italic;
}

/* Equipment indicators */
.manifest-miner-equipment {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.manifest-equipment-indicator {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.manifest-equipment-indicator.equipped {
    /* No border - using box-shadow (inset) for tier indicator */
    border: none;
    opacity: 1;
    /* Same size as empty */
    width: 12px;
    height: 12px;
    font-size: 8px;
}

.manifest-equipment-indicator.empty {
    border: 1px solid rgba(85, 85, 85, 0.5);
    opacity: 0.3;
}

/* Loading state */
.manifest-loading {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    padding: 20px;
    font-style: italic;
}

/* Empty state */
.manifest-empty {
    text-align: center;
    color: #888;
    font-size: 11px;
    padding: 30px 10px;
    font-style: italic;
}

.manifest-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* === DETAIL PANEL (Inline, Top-Right) === */
.manifest-detail-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(85, 85, 85, 0.3);
    height: 300px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    position: relative;
    touch-action: pan-y; /* Enable touch/wheel scrolling */
}

/* Custom scrollbar for detail panel */
.manifest-detail-panel::-webkit-scrollbar {
    width: 8px;
}

.manifest-detail-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.manifest-detail-panel::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

.manifest-detail-panel::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

.detail-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
    padding: 40px 20px;
}

.detail-panel-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.detail-panel-empty .empty-text {
    font-size: 12px;
    color: #888;
}

/* Detail sections in inline panel */
.inline-detail-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
}

.inline-detail-section:last-child {
    margin-bottom: 0;
}

.inline-detail-title {
    font-size: 11px;
    font-weight: 600;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding-bottom: 4px;
}

.inline-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 10px;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.05);
}

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

.inline-detail-label {
    color: #aaa;
}

.inline-detail-value {
    color: #fff;
    font-weight: 600;
}

/* === INVENTORY PANEL (Bottom-RIGHT) === */
.manifest-inventory-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(85, 85, 85, 0.3);
    padding: 8px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.manifest-inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.manifest-inventory-panel .section-header {
    margin: 0;
    flex-shrink: 0; /* Header stays visible */
}

/* Tier Filter Checkboxes */
.manifest-tier-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    flex-shrink: 0;
}

.tier-filter-label {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-size: 10px;
    color: #aaa;
    user-select: none;
    transition: color 0.2s ease;
}

.tier-filter-label:hover {
    color: #fff;
}

.tier-filter-checkbox {
    width: 12px;
    height: 12px;
    cursor: pointer;
    margin: 0;
    accent-color: #8B4513; /* Brown mining theme */
}

/* Style unchecked labels to be more muted */
.tier-filter-label:has(.tier-filter-checkbox:not(:checked)) {
    color: #555;
}

.tier-filter-label:has(.tier-filter-checkbox:not(:checked)):hover {
    color: #888;
}

/* First checkbox (All) styling */
.tier-filter-label:first-child {
    font-weight: 600;
    margin-right: 4px;
    padding-right: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Manifest Salvage Trash Can */
.manifest-salvage-trash-can {
    width: 32px;
    height: 32px;
    background: rgba(139, 69, 19, 0.8);
    border: 2px solid #A0774A;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #FFD700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0;
}

.manifest-salvage-trash-can:hover {
    background: rgba(160, 82, 45, 0.9);
    border-color: #FFD700;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.manifest-salvage-trash-can.drag-over {
    background: rgba(255, 69, 0, 0.8);
    border-color: #FF4500;
    animation: manifest-trash-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes manifest-trash-pulse {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.2); }
}

.manifest-salvage-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4500;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    border: 1px solid #FFD700;
}

.manifest-salvage-count-badge.visible {
    display: flex;
}

#manifest-inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    height: 150px;
    max-height: 150px;
    position: relative;
    touch-action: pan-y; /* Enable touch/wheel scrolling */
}

/* Custom scrollbar for inventory grid */
#manifest-inventory-grid::-webkit-scrollbar {
    width: 8px;
}

#manifest-inventory-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#manifest-inventory-grid::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

#manifest-inventory-grid::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

.manifest-inventory-item {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(85, 85, 85, 0.4);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.manifest-inventory-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    z-index: 10;
}

.manifest-inventory-item:active {
    transform: scale(0.95);
}

/* Pending state for inventory items */
.manifest-inventory-item.pending {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    animation: pulse-pending 1.5s ease-in-out infinite;
}

@keyframes pulse-pending {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}

.pending-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 4px;
    border-radius: 3px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === EQUIPPED ITEMS (CLICKABLE TO UNEQUIP) === */
.equipped-item-slot:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5) !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.equipped-item-slot:active {
    transform: scale(0.95);
}

/* Pending state for equipped items */
.equipped-item-slot.pending {
    opacity: 0.6;
    animation: pulse-pending 1.5s ease-in-out infinite;
}

.manifest-inventory-item.empty {
    opacity: 0.3;
    cursor: default;
}

.manifest-inventory-item.empty:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(85, 85, 85, 0.4);
    transform: none;
    box-shadow: none;
}

.inventory-item-icon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    margin-bottom: 2px;
    position: relative;
}

/* Roman numeral background for tier */
.tier-roman-numeral {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 68px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    z-index: 0;
    pointer-events: none;
    user-select: none;
    font-family: 'Times New Roman', serif;
    line-height: 1;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    letter-spacing: -3px;
}

/* Icon emoji should be on top */
.item-icon-emoji {
    position: relative;
    z-index: 1;
}

.inventory-item-name {
    font-size: 7px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.1;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.inventory-item-rarity {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 6px;
    color: #FFD700;
    background: rgba(0, 0, 0, 0.8);
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.inventory-loading,
.inventory-empty {
    grid-column: span 5;
    text-align: center;
    color: #666;
    font-size: 10px;
    padding: 20px;
    font-style: italic;
}

/* === RESPONSIVE === */
/* CRITICAL: Button must ALWAYS stay 48x48 circular - no distortion at small viewports */
#miners-manifest-panel.collapsed {
    /* Force button to maintain circular shape at ALL viewport sizes */
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    top: 20px !important;
    right: 20px !important;
}

@media (max-width: 768px) {
    /* Expanded panel adapts to smaller screens */
    #miners-manifest-panel:not(.collapsed) {
        width: 90vw;
        max-width: 560px;
        right: 5vw;
        top: 20px;
    }
    
    .manifest-left-column {
        width: 220px;
    }
    
    .manifest-right-column {
        width: 300px;
    }
}

/* === DETAIL CARD MODAL === */
.manifest-detail-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.manifest-detail-card.visible {
    opacity: 1;
    visibility: visible;
}

.manifest-detail-card .detail-card-header {
    background: linear-gradient(135deg, #4a3f35, #5a4f45);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.manifest-detail-card .detail-card-title {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    text-transform: none;
}

.manifest-detail-card .detail-card-close {
    background: none;
    border: none;
    color: #ddd;
    font-size: 28px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.manifest-detail-card .detail-card-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.1);
}

.manifest-detail-card .detail-card-content {
    background: linear-gradient(135deg, rgba(40, 30, 20, 0.98), rgba(20, 15, 10, 0.98));
    max-width: 500px;
    max-height: 80vh;
    width: 90%;
    border-radius: 0 0 10px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Custom scrollbar for detail card */
.detail-card-content::-webkit-scrollbar {
    width: 8px;
}

.detail-card-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.detail-card-content::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

.detail-card-content::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}

/* Detail sections */
.detail-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding-bottom: 6px;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

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

.detail-label {
    font-size: 13px;
    color: #ccc;
}

.detail-value {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}

.detail-profession {
    color: #90EE90;
    text-transform: capitalize;
}

/* XP Display */
.detail-xp-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-xp-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #ddd;
}

.detail-xp-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.detail-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Stats Grid */
.detail-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.detail-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.detail-stat-label {
    font-size: 12px;
    color: #aaa;
}

.detail-stat-value {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}

/* Power Display */
.detail-power-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-power-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.detail-power-text .power-used {
    color: #4A90E2;
}

.detail-power-text.over-limit .power-used {
    color: #E74C3C;
}

.detail-power-text .power-separator {
    color: #888;
}

.detail-power-text .power-total {
    color: #ddd;
}

.detail-power-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.detail-power-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2, #357ABD);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.detail-power-fill.over-limit {
    background: linear-gradient(90deg, #E74C3C, #C0392B);
}

/* Equipment Slots */
.detail-equipment-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.detail-equipment-slot {
    position: relative;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(85, 85, 85, 0.4);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.detail-equipment-slot.equipped {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.05);
}

.detail-equipment-slot .slot-number {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 9px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.detail-equipment-slot .equipped-item-icon {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-bottom: 4px;
}

.detail-equipment-slot .equipped-item-name {
    font-size: 8px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.detail-equipment-slot .equipped-item-power {
    font-size: 7px;
    color: #FFD700;
    margin-top: 2px;
}

.detail-equipment-slot .empty-slot-text {
    font-size: 10px;
    color: #666;
    font-style: italic;
}

/* Mining Stats */
.detail-mining-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* === DRAG AND DROP VISUAL FEEDBACK === */

/* Make inventory items draggable */
.manifest-inventory-item:not(.pending):not(.empty) {
    cursor: grab;
}

.manifest-inventory-item:not(.pending):not(.empty):active {
    cursor: grabbing;
}

/* Dragging state */
.manifest-inventory-item.dragging,
.equipped-item-slot.dragging {
    opacity: 0.3;
    transform: scale(0.95);
}

/* Drag preview (floating item) */
.inventory-drag-preview {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    transform: scale(1.2);
    transition: opacity 0.1s ease;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

/* Drop zone highlights */
.drop-zone-highlight {
    border: 2px dashed rgba(76, 175, 80, 0.6) !important;
    background: rgba(76, 175, 80, 0.1) !important;
    animation: pulse-highlight 1s ease-in-out infinite;
}

.drop-valid {
    border: 2px solid #4CAF50 !important;
    background: rgba(76, 175, 80, 0.2) !important;
    animation: pulse-valid 0.6s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5) !important;
}

.drop-invalid {
    border: 2px solid #E74C3C !important;
    background: rgba(231, 76, 60, 0.2) !important;
    cursor: not-allowed !important;
}

/* Power warning tooltip */
.power-warning {
    position: fixed;
    z-index: 10000;
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    animation: fadeInWarning 0.2s ease;
}

/* Swap mode indicator */
#swap-mode-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(74, 144, 226, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10001;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: fadeInScale 0.2s ease;
}

/* Make equipped items look draggable */
.equipped-item-slot[data-item-id]:not(.pending) {
    cursor: grab;
}

.equipped-item-slot[data-item-id]:not(.pending):active {
    cursor: grabbing;
}

/* === ANIMATIONS === */

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation disabled to prevent flickering during equipment changes */
/* .manifest-miner-entry {
    animation: slideInRight 0.2s ease-out;
} */

/* Detail card animation */
@keyframes detailCardIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.manifest-detail-card.visible .detail-card-header,
.manifest-detail-card.visible .detail-card-content {
    animation: detailCardIn 0.3s ease-out;
}

/* Drop zone pulse animations */
@keyframes pulse-highlight {
    0%, 100% {
        border-color: rgba(76, 175, 80, 0.6);
        background: rgba(76, 175, 80, 0.1);
    }
    50% {
        border-color: rgba(76, 175, 80, 0.9);
        background: rgba(76, 175, 80, 0.15);
    }
}

@keyframes pulse-valid {
    0%, 100% {
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 16px rgba(76, 175, 80, 0.7);
        transform: scale(1.02);
    }
}

/* Warning fade in */
@keyframes fadeInWarning {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Swap mode fade in and scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Quick equip/unequip animations */
@keyframes quickEquip {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
        background: rgba(76, 175, 80, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes quickUnequip {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
        background: rgba(231, 76, 60, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Legendary pulse animation (matching reagent bag) */
@keyframes legendaryPulse {
    0% {
        filter: brightness(1);
    }
    100% {
        filter: brightness(1.2);
    }
}

/* Apply legendary pulse to tier 5 items */
.manifest-inventory-item[data-rarity="5"] .inventory-item-icon,
.manifest-equipment-indicator.equipped[data-rarity="5"],
.equipped-item-slot[data-rarity="5"] {
    animation: legendaryPulse 2s ease-in-out infinite alternate;
}

/* ===================================
   ITEM TOOLTIP STYLES
   =================================== */

.inventory-item-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #2a2520 0%, #1a1510 100%);
    border: 2px solid #8B7355;
    border-radius: 8px;
    padding: 12px;
    min-width: 250px;
    max-width: 350px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    font-family: 'Arial', sans-serif;
    color: #e6d5b8;
}

.inventory-item-tooltip .tooltip-header {
    border-bottom: 1px solid rgba(139, 115, 85, 0.4);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.inventory-item-tooltip .tooltip-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.inventory-item-tooltip .tooltip-type {
    font-size: 12px;
    color: #b8b8b8;
    font-style: italic;
}

.inventory-item-tooltip .tooltip-stats {
    padding: 8px 0;
    line-height: 1.6;
}

.inventory-item-tooltip .stat-line {
    font-size: 13px;
    color: #d4af37;
    margin: 4px 0;
    padding: 2px 0;
}

.inventory-item-tooltip .tooltip-footer {
    border-top: 1px solid rgba(139, 115, 85, 0.4);
    padding-top: 8px;
    margin-top: 8px;
}

.inventory-item-tooltip .tooltip-power {
    font-size: 12px;
    color: #4A90E2;
    font-weight: bold;
    margin-bottom: 6px;
}

.inventory-item-tooltip .tooltip-actions {
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* ===================================
   SALVAGE SYSTEM STYLES
   =================================== */

/* Salvage Trash Can Container */
.salvage-trash-container {
    position: relative;
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    padding-right: 8px;
}

.salvage-trash-can {
    width: 35px;
    height: 35px;
    background: rgba(139, 69, 19, 0.8);
    border: 2px solid #A0774A;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #FFD700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.salvage-trash-can:hover {
    background: rgba(160, 82, 45, 0.9);
    border-color: #FFD700;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.salvage-trash-can.drag-over {
    background: rgba(255, 69, 0, 0.8);
    border-color: #FF4500;
    animation: trash-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes trash-pulse {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.2); }
}

.salvage-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4500;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid #FFD700;
    display: none; /* Hidden by default */
}

.salvage-count-badge.visible {
    display: flex;
}

/* Salvage Confirmation Dialog */
.salvage-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    pointer-events: none;
}

.salvage-confirmation-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.salvage-confirmation-dialog {
    width: 500px;
    max-height: 600px;
    background: linear-gradient(135deg, #2C1A0D, #3E2723);
    border: 3px solid #A0774A;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    color: #F8E7D1;
    display: flex;
    flex-direction: column;
}

.salvage-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #A0774A;
}

.salvage-dialog-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
}

.salvage-dialog-close {
    background: #8B4513;
    border: 1px solid #A0522D;
    color: #F8E7D1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.salvage-dialog-close:hover {
    background: #A0522D;
    color: white;
}

.salvage-items-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(160, 119, 74, 0.3);
}

.salvage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(160, 119, 74, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
}

.salvage-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #FFD700;
}

.salvage-item.removing {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}

.salvage-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.salvage-item-details {
    flex: 1;
}

.salvage-item-name {
    font-weight: bold;
    color: #FFD700;
    font-size: 14px;
}

.salvage-item-stats {
    font-size: 11px;
    color: #B8B8B8;
    margin-top: 2px;
}

.salvage-item-remove {
    background: #8B4513;
    border: 1px solid #A0522D;
    color: #F8E7D1;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.salvage-item-remove:hover {
    background: #A0522D;
    color: white;
}

.salvage-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.salvage-confirm-btn,
.salvage-cancel-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: 2px solid;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

.salvage-confirm-btn {
    background: #8B4513;
    border-color: #A0522D;
    color: #F8E7D1;
}

.salvage-confirm-btn:hover {
    background: #A0522D;
    color: white;
    transform: translateY(-1px);
}

.salvage-cancel-btn {
    background: #2C1A0D;
    border-color: #A0774A;
    color: #F8E7D1;
}

.salvage-cancel-btn:hover {
    background: #3E2723;
    border-color: #FFD700;
    color: #FFD700;
}

.salvage-empty-message {
    text-align: center;
    color: #B8B8B8;
    font-style: italic;
    padding: 20px;
}

/* Salvage Results Report */
.salvage-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2100;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    pointer-events: none;
}

.salvage-results-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.salvage-results-dialog {
    width: 450px;
    max-height: 500px;
    background: linear-gradient(135deg, #1a472a, #2e5e3e);
    border: 3px solid #4CAF50;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
    color: #F8E7D1;
    display: flex;
    flex-direction: column;
}

.salvage-results-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
}

.salvage-results-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: bold;
    color: #66BB6A;
    margin-bottom: 5px;
}

.salvage-results-subtitle {
    font-size: 14px;
    color: #A8E6CF;
}

.salvage-results-content {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.salvage-result-section {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.salvage-result-title {
    font-weight: bold;
    color: #66BB6A;
    margin-bottom: 8px;
    font-size: 16px;
}

.salvage-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.salvage-result-item:last-child {
    border-bottom: none;
}

.salvage-result-label {
    color: #E8F5E8;
    font-size: 14px;
}

.salvage-result-value {
    font-weight: bold;
    color: #81C784;
    font-size: 14px;
}

.salvage-result-value.resource {
    color: #FFD54F;
}

.salvage-result-value.reagent {
    color: #9575CD;
}

.salvage-result-value.moratorium {
    color: #FF8A65;
}

.salvage-results-close {
    background: #4CAF50;
    border: 2px solid #66BB6A;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    align-self: center;
    transition: all 0.3s ease;
}

.salvage-results-close:hover {
    background: #66BB6A;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* ===================================
   NAME EDIT MODAL
   =================================== */

.name-edit-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #F8E7D1;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
}

.name-edit-modal.open {
    display: block;
}

.name-edit-header {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: bold;
    color: #4A2D17;
    margin-bottom: 15px;
    text-align: center;
}

.name-edit-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #85634D;
    border-radius: 3px;
    margin-bottom: 15px;
    background-color: #FFF;
    color: #4A2D17;
}

.name-edit-buttons {
    display: flex;
    justify-content: space-between;
}

.name-edit-button {
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
}

.name-edit-save {
    background-color: #6B4625;
    color: #F8E7D1;
}

.name-edit-cancel {
    background-color: #ccc;
    color: #333;
}

/* ===================================
   PROFESSION ASSIGNMENT STYLES
   =================================== */

.miner-profession {
    margin-top: 8px;
}

.profession-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profession-status.assigned {
    background: rgba(74, 124, 89, 0.2);
    border: 1px solid #4a7c59;
    border-radius: 4px;
    padding: 6px;
}

.profession-name {
    color: #4a7c59;
    font-weight: bold;
    font-size: 12px;
}

.assign-profession-btn {
    background: linear-gradient(135deg, #A0774A 0%, #8B6F47 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(107, 70, 37, 0.2);
    position: relative;
    overflow: hidden;
}

.assign-profession-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.assign-profession-btn:hover::before {
    left: 100%;
}

.assign-profession-btn:hover {
    background: linear-gradient(135deg, #B8855D 0%, #9B7A52 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(107, 70, 37, 0.3);
}

.assign-profession-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(107, 70, 37, 0.2);
}

.unassign-profession-btn {
    background: #7a4444;
    color: #fff;
    border: 1px solid #aa6666;
    border-radius: 3px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.unassign-profession-btn:hover {
    background: #8a5454;
    transform: scale(1.05);
}

/* Profession Selection Modal */
.profession-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profession-modal-content {
    background: linear-gradient(135deg, #2a2520, #4a3f35);
    border: 3px solid #d4af37;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
}

.profession-modal-header {
    background: linear-gradient(90deg, #5a4a3a, #6b5b4b);
    border-bottom: 2px solid #d4af37;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.profession-modal-header h3 {
    color: #d4af37;
    margin: 0;
    font-size: 18px;
}

.profession-modal-close {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.profession-modal-close:hover {
    background: rgba(212, 175, 55, 0.2);
}

.profession-options {
    padding: 20px;
}

.profession-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #4a3f35, #5a4f45);
    border: 1px solid #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.profession-option:hover {
    border-color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.profession-icon {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.profession-info {
    flex: 1;
}

.profession-name {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.profession-description {
    color: #ccc;
    font-size: 12px;
}

.profession-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #555;
    text-align: right;
}

.profession-cancel-btn {
    background: #666;
    color: #fff;
    border: 1px solid #888;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profession-cancel-btn:hover {
    background: #777;
    transform: scale(1.02);
}

