/* WebPyfa - EVE Online Fitting Tool Styles */

:root {
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1a;
    --bg-panel: #16213e;
    --bg-hover: #1f3460;
    --border-color: #2a3f5f;
    --text-primary: #e8e8e8;
    --text-secondary: #8892a0;
    --accent-blue: #4a9eff;
    --accent-green: #4caf50;
    --accent-red: #f44336;
    --accent-orange: #ff9800;
    --accent-purple: #9c27b0;

    /* Damage type colors */
    --em-color: #2196f3;
    --therm-color: #f44336;
    --kin-color: #9e9e9e;
    --exp-color: #ff9800;

    /* Slot colors */
    --high-slot: #e53935;
    --med-slot: #1e88e5;
    --low-slot: #43a047;
    --rig-slot: #8e24aa;

    /* HP type colors */
    --shield-color: #4a9eff;
    --armor-color: #ff9800;
    --hull-color: #9e9e9e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.logo i {
    font-size: 1.6rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-panel);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background: #3a8ae5;
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 90px);
}

/* Panels */
.left-panel, .right-panel {
    width: 300px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-panel {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Browser Tabs */
.browser-tabs {
    display: flex;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
    background: var(--bg-panel);
}

.tab-btn:hover:not(.active) {
    background: var(--bg-hover);
}

/* Browser Content */
.browser-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.browser-content.active {
    display: flex;
}

/* Search Box */
.search-box {
    padding: 10px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-darker);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Race/Meta Selectors */
.race-selector, .meta-filters {
    display: flex;
    padding: 5px 10px;
    gap: 5px;
    flex-wrap: wrap;
}

.race-btn, .meta-btn {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-darker);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.race-btn.active, .meta-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Tree View */
.tree-view {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    max-height: 40%;
}

/* Tree Node Structure */
.tree-node {
    user-select: none;
}

.tree-children {
    /* Children are indented via padding on .tree-item */
}

.tree-item {
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: background-color 0.15s;
}

.tree-item:hover {
    background: var(--bg-hover);
}

.tree-item.active {
    background: var(--accent-blue);
    color: white;
}

/* Tree expander icon (chevron) */
.tree-expander {
    width: 12px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.tree-item:hover .tree-expander {
    color: var(--text-primary);
}

.tree-item.active .tree-expander {
    color: white;
}

/* Spacer for non-folder items to align with folders */
.tree-expander-spacer {
    display: inline-block;
    width: 12px;
    flex-shrink: 0;
}

/* Tree icon (folder/cube) */
.tree-icon {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.tree-item:hover .tree-icon {
    color: var(--accent-blue);
}

.tree-item.active .tree-icon {
    color: white;
}

/* Tree label */
.tree-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading and error states */
.loading,
.error,
.tree-loading,
.tree-error {
    padding: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.tree-loading,
.tree-error {
    padding: 6px 10px 6px 38px;
    text-align: left;
}

.error,
.tree-error {
    color: var(--accent-red);
}

/* Legacy support for ship classes tree */
#ship-classes .tree-item i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
}

#ship-classes .tree-item.active i {
    color: white;
}

/* Item List */
.item-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    border-top: 1px solid var(--border-color);
}

.item-entry {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.item-entry:hover {
    background: var(--bg-hover);
}

.item-entry.selected {
    background: var(--accent-blue);
}

.item-entry img {
    width: 32px;
    height: 32px;
    border-radius: 3px;
}

.item-entry .item-info {
    flex: 1;
}

.item-entry .item-name {
    display: block;
    font-weight: 500;
}

.item-entry .item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Fit Tabs */
.fit-tabs {
    display: flex;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.fit-tab {
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-right: 1px solid var(--border-color);
}

.fit-tab.active {
    background: var(--bg-panel);
    color: var(--text-primary);
}

.fit-tab .close-tab {
    font-size: 0.8rem;
    opacity: 0.6;
}

.fit-tab .close-tab:hover {
    opacity: 1;
    color: var(--accent-red);
}

.add-fit-btn {
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: var(--accent-blue);
    cursor: pointer;
}

/* Fitting View */
.fitting-view {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.no-fit-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.no-fit-selected i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-fit-selected h2 {
    margin-bottom: 10px;
}

/* Ship Header */
.ship-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-darker);
    border-radius: 8px;
}

.ship-header img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--bg-panel);
}

.fit-name-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: bold;
    width: 100%;
}

.fit-name-input:focus {
    outline: none;
    border-bottom: 1px solid var(--accent-blue);
}

.ship-name {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.readonly-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-orange);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(255, 152, 0, 0.15);
    border-radius: 4px;
    margin-top: 4px;
}

.readonly-indicator i {
    font-size: 0.7rem;
}

/* Subsystem Container (T3 Cruisers) */
.subsystem-container {
    display: none; /* Hidden by default, shown via JS for T3 cruisers */
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--accent-purple);
}

.subsystem-container h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-purple);
}

.subsystem-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.subsystem-slot {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
}

.subsystem-slot:hover {
    border-color: var(--accent-purple);
    background: var(--bg-hover);
}

.subsystem-slot.empty {
    opacity: 0.7;
}

.subsystem-slot.empty:hover {
    opacity: 1;
}

.subsystem-slot.filled {
    border-color: var(--accent-purple);
}

.subsystem-slot .subsystem-label {
    font-size: 0.7rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subsystem-slot .subsystem-empty {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.subsystem-slot img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.subsystem-slot .subsystem-name {
    font-size: 0.65rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.subsystem-slot .remove-subsystem {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.subsystem-slot {
    position: relative;
}

.subsystem-slot.filled:hover .remove-subsystem {
    display: flex;
}

/* Slots Container */
.slots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.slot-group {
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 15px;
}

.slot-group h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

#high-slots h3 i { color: var(--high-slot); }
#med-slots h3 i { color: var(--med-slot); }
#low-slots h3 i { color: var(--low-slot); }
#rig-slots h3 i { color: var(--rig-slot); }

.slots {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    min-height: 44px;
    cursor: pointer;
    transition: all 0.2s;
}

.slot:hover {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
}

.slot.filled {
    border-style: solid;
}

.slot.high { border-left: 3px solid var(--high-slot); }
.slot.med { border-left: 3px solid var(--med-slot); }
.slot.low { border-left: 3px solid var(--low-slot); }
.slot.rig { border-left: 3px solid var(--rig-slot); }

.slot img {
    width: 32px;
    height: 32px;
    border-radius: 3px;
}

.slot .module-name {
    flex: 1;
    font-size: 0.85rem;
}

.slot .module-charge {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.slot .module-state {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
}

.slot .module-state.offline {
    background: var(--text-secondary);
}

.slot .module-state.overheated {
    background: var(--accent-orange);
}

.slot .remove-btn {
    opacity: 0;
    color: var(--accent-red);
    cursor: pointer;
}

.slot:hover .remove-btn {
    opacity: 1;
}

.slot.empty {
    color: var(--text-secondary);
    font-size: 0.8rem;
    justify-content: center;
}

/* Additions Tabs */
.additions-tabs {
    display: flex;
    margin-top: 20px;
    border-bottom: 1px solid var(--border-color);
}

.add-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.add-tab-btn.active {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}

.additions-content {
    background: var(--bg-darker);
    border-radius: 0 0 8px 8px;
    min-height: 150px;
}

.add-panel {
    display: none;
    padding: 15px;
}

.add-panel.active {
    display: block;
}

/* Stats Panel */
.stats-panel {
    padding: 15px;
    overflow-y: auto;
    height: 100%;
}

.stats-panel h2 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.stat-section {
    margin-bottom: 20px;
}

.stat-section h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.stat-row > span:first-child {
    width: 80px;
    color: var(--text-secondary);
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.cpu-bar { background: var(--accent-blue); }
.pg-bar { background: var(--accent-orange); }
.cal-bar { background: var(--accent-purple); }

/* EHP/DPS Display */
.ehp-display, .dps-display {
    text-align: center;
    padding: 15px;
    background: var(--bg-darker);
    border-radius: 8px;
    margin-bottom: 15px;
}

.ehp-value, .dps-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-green);
}

.dps-value {
    color: var(--accent-red);
}

.ehp-label, .dps-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Resistance Table */
.resist-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.resist-table th, .resist-table td {
    padding: 6px 4px;
    text-align: center;
}

.resist-table th.em { color: var(--em-color); }
.resist-table th.therm { color: var(--therm-color); }
.resist-table th.kin { color: var(--kin-color); }
.resist-table th.exp { color: var(--exp-color); }

.resist-table tbody tr:nth-child(odd) {
    background: var(--bg-darker);
}

/* Rep Rates */
.rep-rates {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rep-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.rep-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    margin-bottom: 4px;
}

.rep-item span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rep-item span:last-child {
    color: var(--accent-green);
    font-weight: 500;
}

.remote-reps {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.remote-reps .rep-item span:last-child {
    color: var(--accent-blue);
}

/* Offense Breakdown */
.offense-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.offense-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px;
    background: var(--bg-darker);
    border-radius: 4px;
}

/* Capacitor Display */
.cap-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cap-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-blue) 0%, var(--bg-darker) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cap-circle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-panel);
    border-radius: 50%;
}

.cap-circle span {
    position: relative;
    z-index: 1;
    font-weight: bold;
}

.cap-info {
    flex: 1;
    font-size: 0.85rem;
}

.cap-info > div {
    margin-bottom: 5px;
}

.cap-info span:first-child {
    color: var(--text-secondary);
}

/* Navigation Stats */
.nav-stats, .target-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item, .target-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px;
    background: var(--bg-darker);
    border-radius: 4px;
}

/* Fit Actions (Save button) */
.fit-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.btn-save {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #45a049;
}

.btn-save.saved {
    background: var(--text-secondary);
}

.save-status {
    font-size: 0.75rem;
    color: var(--accent-green);
}

/* Fittings Browser */
.fittings-list {
    overflow-y: auto;
    flex: 1;
}

.fittings-ship-group {
    margin-bottom: 10px;
}

.fittings-ship-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-darker);
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
}

.fittings-ship-header:hover {
    background: var(--bg-hover);
}

.fittings-ship-header img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.fittings-ship-header .ship-name {
    flex: 1;
    font-size: 0.85rem;
}

.fittings-ship-header .fit-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-panel);
    padding: 2px 8px;
    border-radius: 10px;
}

.fittings-ship-fits {
    padding-left: 15px;
}

.fitting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-panel);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    border-left: 3px solid var(--accent-blue);
}

.fitting-item:hover {
    background: var(--bg-hover);
}

.fitting-item .fit-name {
    flex: 1;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fitting-item .fit-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.fitting-item .delete-fit {
    opacity: 0;
    color: var(--accent-red);
    cursor: pointer;
    padding: 4px;
}

.fitting-item:hover .delete-fit {
    opacity: 1;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-panel);
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body textarea {
    width: 100%;
    height: 200px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 10px;
    font-family: monospace;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Drone Quantity Modal */
.modal-small {
    width: 350px;
}

.drone-qty-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--bg-darker);
    border-radius: 6px;
}

.drone-qty-preview img {
    width: 48px;
    height: 48px;
}

.drone-qty-preview span {
    font-size: 1rem;
    color: var(--text-primary);
}

.drone-qty-controls label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.qty-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.qty-input-group input {
    width: 70px;
    text-align: center;
    padding: 8px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
}

.qty-input-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-qty {
    padding: 8px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.btn-qty:hover {
    background: var(--bg-lighter);
    border-color: var(--accent-blue);
}

.qty-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-preset {
    padding: 6px 14px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.btn-preset:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Tooltip */
.tooltip {
    position: fixed;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    max-width: 300px;
    font-size: 0.85rem;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Empty State */
.empty-state {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Responsive */
@media (max-width: 1200px) {
    .left-panel, .right-panel {
        width: 250px;
    }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }

    .left-panel, .right-panel {
        width: 100%;
        height: auto;
        max-height: 300px;
    }

    .slots-container {
        grid-template-columns: 1fr;
    }
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    min-width: 180px;
    padding: 5px 0;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.context-menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

/* Module charge indicator */
.module-charge {
    font-size: 0.7rem;
    color: var(--accent-orange);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.charge-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 3px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    padding: 2px;
    line-height: 0;
}

.charge-indicator img {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

/* Charge selector dialog */
.charge-group-header {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
}

.charge-item {
    cursor: pointer;
    transition: background 0.2s;
}

.charge-item:hover {
    background: var(--bg-hover);
}

/* Module state indicators */
.slot.filled {
    position: relative;
}

.slot.filled .module-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0 6px;
    margin-left: auto;
}

.slot.filled .module-state i {
    font-size: 0.75rem;
}

/* Offline state - dimmed appearance */
.slot.filled .module-state.offline {
    background: var(--bg-darker);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.slot.filled.state-offline {
    opacity: 0.5;
}

.slot.filled.state-offline img {
    filter: grayscale(70%);
}

/* Online state - green indicator */
.slot.filled .module-state.online {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

/* Active state - green with glow */
.slot.filled .module-state.active {
    background: rgba(76, 175, 80, 0.3);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.slot.filled.state-active {
    border-color: var(--accent-green);
    box-shadow: inset 0 0 10px rgba(76, 175, 80, 0.2);
}

/* Overheated state - red/orange with pulsing glow */
.slot.filled .module-state.overheated {
    background: rgba(244, 67, 54, 0.3);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.6);
    animation: overheat-pulse 1.5s ease-in-out infinite;
}

.slot.filled.state-overheated {
    border-color: var(--accent-red);
    box-shadow: inset 0 0 15px rgba(244, 67, 54, 0.3);
    animation: overheat-border 1.5s ease-in-out infinite;
}

@keyframes overheat-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(244, 67, 54, 0.4); }
    50% { box-shadow: 0 0 15px rgba(244, 67, 54, 0.8); }
}

@keyframes overheat-border {
    0%, 100% { box-shadow: inset 0 0 10px rgba(244, 67, 54, 0.2); }
    50% { box-shadow: inset 0 0 20px rgba(244, 67, 54, 0.4); }
}

/* Module Control Buttons */
.module-controls {
    display: flex;
    gap: 3px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.slot:hover .module-controls {
    opacity: 1;
}

.mod-ctrl-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-darker);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.15s;
}

.mod-ctrl-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: scale(1.1);
}

.mod-ctrl-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Power button states */
.mod-ctrl-btn.power.on {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.mod-ctrl-btn.power.off {
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.mod-ctrl-btn.power:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.2);
}

/* Activate button states */
.mod-ctrl-btn.activate.active {
    color: var(--accent-green);
    border-color: var(--accent-green);
    background: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}

.mod-ctrl-btn.activate:hover:not(:disabled):not(.active) {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

/* Overheat button states */
.mod-ctrl-btn.overheat.active {
    color: var(--accent-red);
    border-color: var(--accent-red);
    background: rgba(244, 67, 54, 0.2);
    box-shadow: 0 0 6px rgba(244, 67, 54, 0.4);
    animation: overheat-btn-pulse 1.5s ease-in-out infinite;
}

.mod-ctrl-btn.overheat:hover:not(:disabled):not(.active) {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

@keyframes overheat-btn-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(244, 67, 54, 0.3); }
    50% { box-shadow: 0 0 10px rgba(244, 67, 54, 0.6); }
}

/* Charge dialog list */
#charge-list {
    max-height: 400px;
    overflow-y: auto;
}

#charge-list .item-entry {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

#charge-list .item-entry:hover {
    background: var(--bg-hover);
}

#charge-list .item-entry img {
    width: 32px;
    height: 32px;
}

#charge-list .charge-info {
    flex: 1;
}

#charge-list .charge-name {
    font-size: 0.9rem;
}

#charge-list .charge-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Drone/Cargo/Implant Entry Styles */
.drone-entry, .cargo-entry, .implant-entry {
    display: flex;
    align-items: center;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 4px;
    gap: 10px;
}

.drone-entry img, .cargo-entry img, .implant-entry img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.drone-entry .item-info, .cargo-entry .item-info, .implant-entry .item-info {
    flex: 1;
    min-width: 0;
}

.drone-entry .item-name, .cargo-entry .item-name, .implant-entry .item-name {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drone-entry .item-meta, .cargo-entry .item-meta, .implant-entry .item-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.drone-controls, .cargo-controls, .implant-controls {
    display: flex;
    gap: 4px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.75rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: var(--bg-hover);
    color: var(--text-primary);
    transition: background 0.2s;
}

.btn-small:hover {
    background: var(--accent-blue);
}

.btn-small.btn-danger:hover {
    background: var(--accent-red);
}

.drone-entry.inactive {
    opacity: 0.6;
}

.drone-entry.active {
    border-left: 3px solid var(--accent-green);
}

.empty-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Drop zone highlighting */
.add-panel {
    min-height: 100px;
    transition: background 0.2s;
}

.add-panel.drag-over {
    background: rgba(74, 158, 255, 0.1);
    border: 2px dashed var(--accent-blue);
    border-radius: 4px;
}

/* Implant Slots - Module-style layout */
.implant-slots-container {
    display: flex;
    gap: 20px;
    padding: 10px;
}

.implant-group {
    flex: 1;
}

.implant-group h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.implant-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.implant-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    border-left: 3px solid var(--accent-purple);
    min-height: 36px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.implant-slot:hover {
    border-color: var(--accent-purple);
    background: var(--bg-hover);
}

.implant-slot.empty {
    opacity: 0.7;
}

.implant-slot.empty:hover {
    opacity: 1;
}

.implant-slot .slot-number {
    font-size: 0.7rem;
    color: var(--accent-purple);
    font-weight: bold;
    min-width: 14px;
}

.implant-slot.filled {
    border-style: solid;
}

.implant-slot.filled img {
    width: 28px;
    height: 28px;
    border-radius: 3px;
}

.implant-slot .implant-name {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.implant-slot .remove-implant {
    opacity: 0;
    color: var(--accent-red);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px;
}

.implant-slot:hover .remove-implant {
    opacity: 1;
}

.implant-slot.drag-over {
    background: rgba(156, 39, 176, 0.15);
    border-color: var(--accent-purple);
    border-style: dashed;
}

/* Drone Stats Header */
.drone-stats-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.drone-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.drone-stat i {
    color: var(--accent-blue);
}

.drone-stat span:last-child {
    font-weight: 500;
}

.drone-stat.over-limit span:last-child {
    color: var(--accent-red);
}

.drone-stat.at-limit span:last-child {
    color: var(--accent-orange, #ff9800);
}

/* Fighter Styles (for Carriers/Supercarriers) */
.fighter-stats-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    gap: 10px;
}

.fighter-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.fighter-stat i {
    color: var(--accent-purple);
}

.fighter-stat span:last-child {
    font-weight: 500;
}

.fighter-stat.over-limit span:last-child {
    color: var(--accent-red);
}

.fighter-slot-info {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
}

.fighter-slot-info .light-slots i {
    color: #64b5f6;
}

.fighter-slot-info .support-slots i {
    color: #81c784;
}

.fighter-slot-info .heavy-slots i {
    color: #ef5350;
}

.fighter-tubes-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fighter-tube {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-height: 60px;
    cursor: pointer;
    transition: all 0.2s;
}

.fighter-tube:hover {
    background: var(--bg-hover);
}

.fighter-tube.empty {
    border-style: dashed;
    opacity: 0.7;
    justify-content: center;
}

.fighter-tube.empty span {
    color: var(--text-secondary);
    font-style: italic;
}

.fighter-tube.filled {
    border-left: 3px solid var(--accent-purple);
}

.fighter-tube.filled.light {
    border-left-color: #64b5f6;
}

.fighter-tube.filled.support {
    border-left-color: #81c784;
}

.fighter-tube.filled.heavy {
    border-left-color: #ef5350;
}

.fighter-tube.active {
    background: rgba(156, 39, 176, 0.1);
}

.fighter-tube.inactive {
    opacity: 0.6;
}

.fighter-tube img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
}

.fighter-tube .fighter-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fighter-tube .fighter-name {
    font-weight: 500;
    color: var(--text-primary);
}

.fighter-tube .fighter-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fighter-tube .fighter-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-left: 8px;
}

.fighter-tube .fighter-type-badge.light {
    background: rgba(100, 181, 246, 0.2);
    color: #64b5f6;
}

.fighter-tube .fighter-type-badge.support {
    background: rgba(129, 199, 132, 0.2);
    color: #81c784;
}

.fighter-tube .fighter-type-badge.heavy {
    background: rgba(239, 83, 80, 0.2);
    color: #ef5350;
}

.fighter-tube .fighter-controls {
    display: flex;
    gap: 6px;
}

.fighter-tube .squadron-size {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    font-size: 0.85rem;
}

.fighter-tube .squadron-size input {
    width: 30px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: center;
    font-size: 0.85rem;
}

.fighter-tube .squadron-size input::-webkit-outer-spin-button,
.fighter-tube .squadron-size input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Fighter Selector Dialog */
.fighter-selector-groups {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.fighter-selector-groups button {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.fighter-selector-groups button:hover {
    background: var(--bg-hover);
}

.fighter-selector-groups button.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* Disabled items in fighter/charge selector */
.item-entry.disabled,
.charge-group-header.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.item-entry.disabled:hover {
    background: transparent;
}

/* Fighter tube drag over state */
.fighter-tube.drag-over {
    background: rgba(156, 39, 176, 0.15);
    border-color: var(--accent-purple);
    border-style: solid;
}

/* Module slot cursor hint */
.slot {
    cursor: pointer;
}

.slot.filled {
    cursor: pointer;
}

/* Skills Panel */
.skills-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.skills-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-darker);
    cursor: pointer;
    user-select: none;
}

.skills-header h2 {
    flex: 1;
    font-size: 0.95rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-header h2 i {
    color: var(--accent-blue);
}

.skills-quick-set {
    display: flex;
    gap: 4px;
    margin-right: 10px;
}

.btn-tiny {
    padding: 3px 8px;
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-secondary);
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
}

.btn-tiny:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.skills-toggle {
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.skills-panel.collapsed .skills-toggle {
    transform: rotate(-90deg);
}

.skills-panel.collapsed .skills-content {
    display: none;
}

.skills-content {
    padding: 10px 12px;
    max-height: 300px;
    overflow-y: auto;
}

.skills-empty {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.skill-category {
    margin-bottom: 12px;
}

.skill-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    gap: 10px;
}

.skill-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.skill-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-effect {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.skill-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.skill-slider {
    width: 90px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.skill-slider::-webkit-slider-runnable-track {
    background: transparent;
    height: 8px;
}

.skill-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-blue);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.1s;
    margin-top: -4px;
}

.skill-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent-green);
}

.skill-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.skill-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-blue);
    border-radius: 50%;
    cursor: grab;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.skill-level-display {
    width: 28px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--accent-blue);
}

.skill-level-value {
    display: inline-block;
}

.skill-slider-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
}

.skill-slider-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 4px;
    transition: width 0.1s;
}

.skill-slider-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    pointer-events: none;
}

.skill-slider-markers .marker {
    width: 4px;
    height: 4px;
    background: var(--border-color);
    border-radius: 50%;
    transition: background 0.1s;
}

.skill-slider-markers .marker.active {
    background: rgba(255,255,255,0.5);
}

.skill-category-header {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-category-count {
    background: var(--bg-darker);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
}

/* Share Dialog */
.share-modal {
    max-width: 500px;
}

.share-message {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.share-message span {
    color: var(--accent-blue);
    font-weight: 600;
}

.share-url-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.share-url-container input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.share-url-container input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.copy-confirm {
    color: var(--accent-green);
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
}

.modal-body label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* Share button style */
.btn-share {
    background: var(--accent-blue);
    color: white;
}

.btn-share:hover {
    background: #3a8eef;
}

/* Copy button style (for non-owned fits) */
.btn-copy {
    background: var(--accent-orange);
    color: white;
}

.btn-copy:hover {
    background: #e68a00;
}

.btn-copy.btn-modified {
    background: var(--accent-red);
    animation: pulse-copy 1.5s ease-in-out infinite;
}

@keyframes pulse-copy {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-panel);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Drone Active Count Controls */
.drone-active-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.drone-count-display {
    display: flex;
    align-items: center;
    font-family: monospace;
    font-size: 1rem;
    background: var(--bg-darker);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 50px;
    justify-content: center;
}

.drone-count-display .active-count {
    color: var(--accent-green);
    font-weight: bold;
}

.drone-count-display .count-separator {
    color: var(--text-secondary);
    margin: 0 2px;
}

.drone-count-display .total-count {
    color: var(--text-secondary);
}

.drone-count-buttons {
    display: flex;
    gap: 4px;
}

.btn-drone-adj {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-drone-adj:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.btn-drone-adj:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-drone-adj.btn-max {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    font-weight: bold;
    font-size: 0.65rem;
    padding: 4px 6px;
}

.btn-drone-adj.btn-max:hover {
    background: #3a8eef;
}

/* Drone entry adjustments */
.drone-entry .item-info {
    flex: 1;
    min-width: 0;
}

.drone-entry.active {
    border-left: 3px solid var(--accent-green);
}

.drone-entry.inactive {
    border-left: 3px solid var(--border-color);
}
