/* ... Предыдущие стили ... */
body { background: #1e1e2f; color: #fff; font-family: sans-serif; }
.app-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: #27293d; 
    padding: 15px 20px; 
    border-radius: 8px; 
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.logo {
    font-size: 1.2em;
    font-weight: bold;
    color: #e14eca;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stats-mini { 
    display: flex; 
    gap: 15px; 
    align-items: center;
    flex-wrap: wrap;
}
.stats-mini span {
    color: #aaa;
}
.stats-mini b {
    color: #fff;
    font-weight: bold;
}

.grid-layout { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 20px;
}
.grid-layout-campaign {
    grid-template-columns: 1.25fr 1.75fr;
}
@media (max-width: 1200px) {
    .grid-layout-campaign {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 1024px) {
    .grid-layout,
    .grid-layout-campaign {
        grid-template-columns: 1fr;
    }
}
.panel { 
    background: #27293d; 
    padding: 20px; 
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.panel-head h2 {
    margin: 0;
    color: #e14eca;
    font-size: 1.3em;
}

/* --- Части тела и сети (новый UX) --- */
.panel-hint { color: #888; font-size: 0.9rem; margin: -0.5rem 0 1rem; }

/* --- Paperdoll (Phaser viewport) --- */
.paperdoll-panel .panel-hint { margin-bottom: 12px; }
.paperdoll-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 14px;
    align-items: start;
}
@media (max-width: 1024px) {
    .paperdoll-layout { grid-template-columns: 1fr; }
}
.game-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    max-height: 420px;
    border-radius: 10px;
    border: 1px solid #3d3d5c;
    background:
        radial-gradient(1200px 700px at 20% 10%, rgba(225, 78, 202, 0.14), transparent 55%),
        radial-gradient(900px 600px at 80% 90%, rgba(52, 152, 219, 0.12), transparent 55%),
        linear-gradient(180deg, #141427 0%, #0f1020 100%);
    overflow: hidden;
    position: relative;
}
.game-viewport canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.game-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.paperdoll-stage {
    background: #1e1e2f;
    border: 1px solid #3d3d5c;
    border-radius: 12px;
    padding: 12px;
}
.paperdoll-stage-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.paperdoll-stage-mid {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 12px;
    align-items: center;
}
@media (max-width: 1200px) {
    .paperdoll-layout { grid-template-columns: 1fr; }
    .paperdoll-stage-mid { grid-template-columns: 200px 1fr 200px; }
}
@media (max-width: 920px) {
    .paperdoll-stage-mid { grid-template-columns: 1fr; }
}

.equip-slots-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (max-width: 920px) {
    .equip-slots-side { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

.paperdoll-ui {
    background: #1e1e2f;
    border: 1px solid #3d3d5c;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 240px;
}
.paperdoll-stats-wrap {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.paperdoll-stats-wrap .tab-view p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #333;
}
.paperdoll-stats-wrap .tab-view hr {
    border: 0;
    border-top: 1px solid #444;
    margin: 15px 0;
}
.paperdoll-variant {
    display: flex;
    align-items: center;
    gap: 8px;
}
.paperdoll-variant-label,
.paperdoll-active-slot-label { color: #aaa; font-size: 0.85rem; }
.paperdoll-active-slot { display: flex; align-items: baseline; gap: 8px; }

.segmented {
    display: inline-flex;
    border: 1px solid #3d3d5c;
    border-radius: 10px;
    overflow: hidden;
    background: #121224;
}
.seg-btn {
    border: 0;
    background: transparent;
    color: #ddd;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
    min-width: 38px;
}
.seg-btn:hover { background: rgba(255,255,255,0.06); }
.seg-btn.active {
    background: rgba(225, 78, 202, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(225, 78, 202, 0.35);
}

.equip-slot-card {
    background: radial-gradient(700px 220px at 50% 0%, rgba(255,255,255,0.06), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 10px 84px 10px 10px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.equip-slot-card.has-item {
    background:
        radial-gradient(700px 220px at 50% 0%, rgba(255,255,255,0.08), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
}
.equip-slot-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.05),
        inset 0 0 0 2px rgba(0,0,0,0.25),
        inset 0 0 18px rgba(0,0,0,0.35);
}
.equip-slot-corners {
    position: absolute;
    inset: 8px;
    pointer-events: none;
    border-radius: 10px;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.20), rgba(255,255,255,0.02)) top/100% 2px no-repeat,
      linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00)) bottom/100% 2px no-repeat,
      linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.00)) left/2px 100% no-repeat,
      linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00)) right/2px 100% no-repeat;
    opacity: 0.9;
}
.equip-slot-corners::before,
.equip-slot-corners::after{
    content:"";
    position:absolute;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.equip-slot-corners::before{ left: -2px; top: -2px; border-right: 0; border-bottom: 0; }
.equip-slot-corners::after{ right: -2px; bottom: -2px; border-left: 0; border-top: 0; }
.equip-slot-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(225,78,202,0.10), rgba(52,152,219,0.08));
    opacity: 0;
    transition: opacity 0.12s;
    pointer-events: none;
}
.equip-slot-card:hover::before { opacity: 1; }
.equip-slot-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.28);
    border-color: rgba(225, 78, 202, 0.6);
}
.equip-slot-card.active {
    border-color: rgba(52, 152, 219, 0.75);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}
.equip-slot-card.rarity-common { --rarity: rgba(210,210,235,0.55); }
.equip-slot-card.rarity-rare { --rarity: rgba(56,189,248,0.75); }
.equip-slot-card.rarity-epic { --rarity: rgba(192,132,252,0.80); }
.equip-slot-card.rarity-legendary { --rarity: rgba(251,191,36,0.85); }
.equip-slot-card.has-item {
    border-color: var(--rarity, rgba(255,255,255,0.12));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.equip-slot-card.has-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.04), inset 0 0 26px rgba(255,255,255,0.04);
    pointer-events: none;
}
.equip-slot-title {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 1;
}
.equip-slot-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cfcfe6;
}
.equip-slot-item {
    font-size: 0.85rem;
    color: #d6d6e6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    max-height: 2.4em;
    position: relative;
    z-index: 1;
}
.equip-slot-item.muted { color: #777; }

.equip-slot-art {
    position: absolute;
    right: -14px;
    top: 36px;
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: radial-gradient(80px 80px at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    transform: rotate(10deg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.75);
    font-size: 34px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    pointer-events: none;
}
.equip-slot-art-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}
.equip-slot-art-fallback { display: none; }
.equip-slot-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    font-size: 0.78rem;
    color: #e7e7ff;
}
.stat-badge .k { opacity: 0.85; }
.stat-badge.fire { border-color: rgba(249,115,22,0.40); }
.stat-badge.elec { border-color: rgba(56,189,248,0.50); }
.stat-badge.armor { border-color: rgba(148,163,184,0.45); }
.stat-badge.hp { border-color: rgba(244,63,94,0.45); }

.inv-stats { display: flex; gap: 6px; flex-wrap: wrap; }

.equip-slot-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    color: #9aa0b3;
    position: relative;
    z-index: 1;
}
.equip-slot-sub .eq-chip {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
    color: #cfcfe6;
}

.paperdoll-inv-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.muted { color: #888; font-size: 0.85rem; }

.paperdoll-inv-tools {
    display: flex;
    gap: 8px;
    align-items: center;
}
.equip-search {
    margin: 0;
    width: 100%;
    background: #121224;
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
}
.equip-search::placeholder { color: rgba(255,255,255,0.40); }

.equip-inventory {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}
@media (max-width: 720px) {
    .equip-inventory { max-height: 390px; }
}

.equip-compare {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
}
.equip-compare.empty { display: none; }
.compare-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.compare-title b { color: #fff; }
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.compare-col {
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 8px;
}
.compare-col .label { color: #aaa; font-size: 0.78rem; }
.compare-col .name { color: #fff; font-weight: 800; margin-top: 2px; }
.compare-deltas { margin-top: 10px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.delta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem;
}
.delta-pos { color: #7bed9f; font-weight: 800; }
.delta-neg { color: #ff6b6b; font-weight: 800; }
.delta-zero { color: #aaa; font-weight: 700; }
.compare-actions { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.compare-actions .btn-inline { padding: 7px 12px; }

.inv-item {
    background: radial-gradient(900px 220px at 30% 0%, rgba(255,255,255,0.06), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 10px 10px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.12s, transform 0.12s;
    position: relative;
    overflow: hidden;
}
.inv-item:hover { border-color: rgba(52, 152, 219, 0.55); transform: translateY(-1px); }
.inv-item .inv-name { font-weight: 700; color: #fff; }
.inv-item .inv-meta { font-size: 0.8rem; color: #aaa; display: flex; gap: 8px; flex-wrap: wrap; }
.inv-item .inv-desc { font-size: 0.82rem; color: #c8c8da; line-height: 1.25; display: block; }
.inv-thumb {
    height: 74px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: radial-gradient(90px 90px at 35% 30%, rgba(255,255,255,0.16), rgba(255,255,255,0.02));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: rgba(255,255,255,0.80);
    margin-bottom: 6px;
}
.inv-thumb-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,0.35));
}
.inv-thumb-fallback { display: none; }
.inv-item.inv-rarity-frame.rarity-common { --rf: rgba(210,210,235,0.55); }
.inv-item.inv-rarity-frame.rarity-rare { --rf: rgba(56,189,248,0.75); }
.inv-item.inv-rarity-frame.rarity-epic { --rf: rgba(192,132,252,0.80); }
.inv-item.inv-rarity-frame.rarity-legendary { --rf: rgba(251,191,36,0.85); }
.inv-item.inv-rarity-frame {
    border-color: var(--rf, rgba(255,255,255,0.12));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.inv-item.inv-rarity-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.03), 0 10px 24px rgba(0,0,0,0.22);
}
.inv-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}
.rarity-common { color: #cfcfe6; }
.rarity-rare { color: #38bdf8; }
.rarity-epic { color: #c084fc; }
.rarity-legendary { color: #fbbf24; }

.equip-slot-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e14eca;
    flex: 0 0 auto;
}
.equip-slot-title .left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.equip-slot-title .left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inv-item .inv-actions { margin-top: 6px; display: flex; gap: 8px; }
.inv-item .btn-inline {
    padding: 5px 10px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
}
.inv-item .btn-inline:hover { background: rgba(255,255,255,0.10); }
.inv-item .btn-inline.primary {
    background: rgba(225, 78, 202, 0.22);
    border-color: rgba(225, 78, 202, 0.35);
}
.inv-item .btn-inline.primary:hover { background: rgba(225, 78, 202, 0.30); }
.body-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.body-part-card {
    background: #1e1e2f;
    border: 1px solid #3d3d5c;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.body-part-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.body-part-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #27293d;
    border-radius: 50%;
    color: #e14eca;
    font-size: 1rem;
}
.body-part-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e4e4e7;
}
.body-part-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.body-slot {
    background: #27293d;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.8rem;
    border: 1px solid #3d3d5c;
}
.body-slot.filled {
    border-color: #3498db;
    color: #fff;
}
.body-slot.empty {
    border-style: dashed;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}
.body-slot-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.body-slot-lvl { font-size: 0.75rem; color: #e14eca; margin-left: 4px; }
.body-slot-effect { display: block; font-size: 0.7rem; color: #888; margin-top: 4px; line-height: 1.2; }
.body-slot-empty { color: #555; }
.body-part-network-hint { font-size: 0.7rem; color: #e14eca; margin: 6px 0 0; }
.levelup-effect-desc { font-size: 0.8rem; color: #aaa; margin: 6px 0 0; line-height: 1.3; max-width: 220px; }

/* Сети в забеге (кампания) */
.campaign-run-networks {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #1e1e2f;
    border-radius: 8px;
    border: 1px solid #3d3d5c;
}
.campaign-run-networks h3 {
    margin: 0 0 12px;
    color: #e14eca;
    font-size: 1rem;
}
.run-networks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 900px) {
    .run-networks-grid { grid-template-columns: repeat(2, 1fr); }
}
.run-network-card {
    background: #27293d;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.run-network-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #32364c;
    border-radius: 50%;
    color: #e14eca;
    font-size: 0.95rem;
}
.run-network-name { font-size: 0.85rem; font-weight: 600; color: #ccc; }
.run-network-implants { font-size: 0.75rem; color: #aaa; display: flex; flex-wrap: wrap; gap: 4px; }
.run-imp { background: #32364c; padding: 2px 6px; border-radius: 4px; }
.run-imp-empty { color: #555; }

.body-part-edit-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #1e1e2f;
    border-radius: 6px;
}
.body-part-edit-row .bp-name { min-width: 140px; }
.body-part-edit-row .bp-icon { min-width: 120px; }
.body-part-edit-row .bp-size { width: 60px; }
.body-part-edit-row label { margin: 0; color: #aaa; font-size: 0.9rem; }

.armor-part-edit-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #1e1e2f;
    border-radius: 10px;
    border: 1px solid #34384f;
    position: relative;
}
.armor-part-edit-row .ap-top {
    display: grid;
    grid-template-columns: 110px minmax(220px, 1fr) 1fr;
    align-items: center;
    gap: 10px;
}
.armor-part-edit-row .ap-drag-handle {
    border: 1px solid #3f4463;
    background: #2a2f45;
    color: #c7ccef;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 28px;
    height: 28px;
    cursor: grab;
}
.armor-part-edit-row .ap-drag-handle:active { cursor: grabbing; }
.armor-part-edit-row.is-dragging {
    opacity: 0.65;
    border-color: #6b74a8;
}
.armor-part-edit-row.drag-over {
    outline: 1px dashed #7f89bf;
    outline-offset: -3px;
}
.armor-part-edit-row.drop-before::before,
.armor-part-edit-row.drop-after::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(90deg, #6f7cff, #a18dff);
    box-shadow: 0 0 0 1px rgba(10, 12, 24, 0.35), 0 0 8px rgba(123, 136, 255, 0.45);
    border-radius: 999px;
    pointer-events: none;
}
.armor-part-edit-row.drop-before::before { top: -2px; }
.armor-part-edit-row.drop-after::after { bottom: -2px; }
.armor-part-edit-row .ap-id {
    color: #9aa0b8;
    font-size: 0.8rem;
    font-family: Consolas, "Courier New", monospace;
    text-transform: lowercase;
}
.armor-part-edit-row .ap-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    min-width: 0;
}
.armor-part-edit-row .ap-preview-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e5b9ff;
    background: rgba(225, 78, 202, 0.16);
    border: 1px solid rgba(225, 78, 202, 0.34);
    flex: 0 0 auto;
}
.armor-part-edit-row .ap-preview-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.armor-part-edit-row .ap-preview-name {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.armor-part-edit-row .ap-preview-stats {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: #aeb6d9;
}
.armor-part-edit-row .ap-preview-dots {
    display: flex;
    gap: 4px;
    margin-top: 1px;
}
.armor-part-edit-row .ap-preview-dots .ap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.16);
}
.armor-part-edit-row .ap-preview-dots .ap-dot.filled {
    background: #5fd2ff;
    border-color: rgba(95, 210, 255, 0.7);
}
.armor-part-edit-row .ap-fields {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(140px, 180px) 130px 130px;
    gap: 10px;
}
.armor-part-edit-row .ap-bonuses {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 10px;
    padding: 8px;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
}
.armor-part-edit-row .ap-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.armor-part-edit-row .ap-field > span {
    color: #b5bad1;
    font-size: 0.78rem;
}
.armor-part-edit-row .ap-name { min-width: 0; }
.armor-part-edit-row .ap-icon { min-width: 0; }
.armor-part-edit-row .ap-size,
.armor-part-edit-row .ap-max-rank { width: 100%; }
.armor-part-edit-row .ap-order-controls {
    display: flex;
    gap: 6px;
}
.armor-part-edit-row .ap-order-controls .btn {
    min-width: 32px;
    padding: 4px 8px;
}
.armor-part-edit-row .ap-run-state {
    color: #9fb3ff;
    font-size: 0.8rem;
    line-height: 1.25;
    text-align: right;
}
#modal-armor-parts .field-invalid {
    border-color: #ff6868 !important;
    box-shadow: 0 0 0 2px rgba(255, 104, 104, 0.22);
}
#modal-armor-parts .btn.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 1100px) {
    .armor-part-edit-row .ap-top { grid-template-columns: 1fr; }
    .armor-part-edit-row .ap-preview { grid-column: 1 / -1; }
    .armor-part-edit-row .ap-run-state { grid-column: 1 / -1; text-align: left; }
    .armor-part-edit-row .ap-fields { grid-template-columns: 1fr 1fr; }
    .armor-part-edit-row .ap-bonuses { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .armor-part-edit-row .ap-fields { grid-template-columns: 1fr; }
    .armor-part-edit-row .ap-bonuses { grid-template-columns: 1fr; }
}

.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.slot { 
    background: #32364c; border: 1px solid #444; border-radius: 6px; 
    padding: 8px; height: 110px; cursor: pointer; position: relative;
    display: flex; flex-direction: column; justify-content: space-between;
}
.slot.empty { opacity: 0.3; border-style: dashed; justify-content: center; align-items: center; }
.slot.network { border-color: #ffd700; background: #3d3d29; }
.slot.linked { border-color: #3498db; }
.slot.selected { border-color: #e74c3c; background: #3c2a2a; }
.slot.blocked { border-color: #666; background: #2a2a2a; opacity: 0.5; }

.name { font-size: 0.85em; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vals { font-size: 0.75em; color: #aaa; }
.top { display: flex; justify-content: space-between; font-size: 0.8em; }

.tabs { display: flex; margin-bottom: 10px; border-bottom: 1px solid #444; }
.tab { background: none; border: none; color: #aaa; padding: 10px; cursor: pointer; }
.tab.active { color: #e14eca; border-bottom: 2px solid #e14eca; }

/* MODALS */
.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); z-index: 1000; }
.modal-content { 
    background: #27293d; 
    margin: 3% auto; 
    padding: 25px; 
    width: 600px; 
    border-radius: 8px; 
    max-height: 90vh; 
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
.modal-content.wide { width: 900px; }
.modal-content.extra-wide { width: 1200px; }
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    .modal-content.wide,
    .modal-content.extra-wide {
        width: 95%;
    }
}
.modal-head { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
    padding-bottom: 10px;
    border-bottom: 2px solid #444;
}
.modal-head h2 {
    margin: 0;
    color: #e14eca;
}
.close { 
    font-size: 28px; 
    cursor: pointer; 
    color: #aaa;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}
.close:hover {
    color: #fff;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444;
}
.modal-body {
    margin: 15px 0;
}

/* Effects Editor */
.effects-editor-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; 
    height: 500px; /* Fixed height for scrolling */
    min-height: 0;
}
.eff-list-col, .eff-form-col { 
    display: flex; flex-direction: column; 
    min-height: 0; /* Important for nested scroll */
}
.scroll-list { 
    flex: 1; overflow-y: auto; 
    border: 1px solid #444; background: #222; 
    border-radius: 4px; padding: 5px;
}
.lib-item { 
    padding: 8px; border-bottom: 1px solid #333; cursor: pointer; 
}
.lib-item:hover { background: #333; color: #e14eca; }

/* Weights UI */
.weights-section { margin-top: 15px; border-top: 1px solid #444; padding-top: 10px; flex: 1; display: flex; flex-direction: column; }
.weights-list { flex: 1; overflow-y: auto; margin-bottom: 10px; border: 1px solid #333; padding: 5px; background: #222; }
.weight-row { display: flex; align-items: center; gap: 10px; padding: 5px; border-bottom: 1px solid #333; }
.tag-badge { background: #444; padding: 2px 6px; border-radius: 3px; font-size: 0.8em; width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val-badge { font-weight: bold; width: 30px; text-align: right; }
.weight-add-row { display: flex; gap: 5px; }

/* Effects Display */
.eff-group-net { background: #2a2c3e; border: 1px solid #ffd700; border-radius: 6px; margin-bottom: 15px; padding: 10px; }
.eff-net-header { border-bottom: 1px solid #444; padding-bottom: 5px; margin-bottom: 5px; }
.adaptation-bonuses { 
    background: rgba(255, 215, 0, 0.1); 
    border-left: 3px solid #ffd700;
    padding: 8px;
    margin-top: 5px;
    border-radius: 3px;
}
.adapt-bonus {
    font-size: 0.85em;
    padding: 2px 5px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 3px;
    margin: 2px;
    display: inline-block;
}
.eff-sub-item { 
    padding: 5px 0; 
    padding-left: 10px; 
    border-left: 2px solid #555; 
    margin-top: 5px; 
    font-size: 0.9em; 
}
.eff-sub-item.blocked { 
    border-left-color: #666; 
    opacity: 0.5; 
    color: #888; 
}
.eff-row { background: #32364c; padding: 8px; margin-bottom: 5px; font-size: 0.9em; border-radius: 4px; }
.eff-divider { border: 0; border-top: 1px dashed #555; margin: 15px 0; }
.gold { color: #ffd700; }

/* Implants Manager */
.implants-manager-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.implant-manager-item {
    background: #32364c;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.implant-manager-item.blocked {
    border-color: #666;
    background: #2a2a2a;
    opacity: 0.7;
}
.implant-info h4 {
    margin: 0 0 10px 0;
    color: #e14eca;
}
.implant-info small {
    color: #888;
    font-size: 0.8em;
}
.implant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}
.implant-tags .tag {
    background: #444;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
}
.implant-stats {
    display: flex;
    gap: 10px;
    font-size: 0.85em;
    color: #aaa;
}
.implant-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.implant-status .status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
}
.implant-status .status.active {
    background: #27ae60;
    color: white;
}
.implant-status .status.blocked {
    background: #e74c3c;
    color: white;
}
.implant-buttons {
    display: flex;
    gap: 5px;
}

/* Network Settings Form */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}
.setting-row label {
    font-weight: bold;
    color: #e14eca;
}
.setting-row input {
    width: 100px;
    background: #111;
    border: 1px solid #444;
    color: white;
    padding: 5px;
    text-align: center;
}

/* Export Stats */
.export-stats {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.export-stats h3 {
    color: #e14eca;
    margin-top: 0;
    border-bottom: 2px solid #e14eca;
    padding-bottom: 5px;
}
.export-stats h4 {
    color: #ffd700;
    margin: 15px 0 10px 0;
}
.combo-example {
    background: #32364c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid #3498db;
}
.combo-example p {
    margin: 5px 0;
}
.combo-example em {
    color: #aaa;
    font-style: italic;
}

/* Add Implant Form */
.add-implant-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    font-weight: bold;
    color: #e14eca;
    font-size: 0.9em;
}
.form-group input, .form-group select, .form-group textarea {
    background: #111;
    border: 1px solid #444;
    color: white;
    padding: 8px;
    border-radius: 4px;
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #444;
    margin-bottom: 15px;
    padding-bottom: 5px;
}
.modal-tab {
    background: none;
    border: none;
    color: #aaa;
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.modal-tab.active {
    color: #e14eca;
    border-bottom-color: #e14eca;
}
.modal-tab-content {
    display: block;
}

/* Inputs & Buttons */
.balance-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-bottom: 15px; 
}
.bal-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}
.bal-row:last-child {
    border-bottom: none;
}

/* Конструктор юнитов */
.units-constructor {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: 320px;
}
.units-list-col .scroll-list { max-height: 360px; overflow-y: auto; }
.units-list-item {
    padding: 10px 12px;
    margin-bottom: 4px;
    background: #1e1e2f;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}
.units-list-item:hover { border-color: #444; }
.units-list-item.selected { border-color: #e14eca; background: #2d2d44; }
.units-form-col .form-group { margin-bottom: 12px; }
.units-form-col .form-group label { display: block; margin-bottom: 4px; color: #aaa; }

/* Конструктор кампании */
.campaign-rooms-editor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 70vh;
    overflow-y: auto;
}
.campaign-room-card {
    background: #27293d;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #333;
}
.campaign-room-card h4 { margin: 0 0 8px 0; font-size: 1em; }
.campaign-room-card .badge.boss { background: #e14eca; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; }

.bal-row label {
    font-weight: bold;
    color: #e14eca;
    min-width: 200px;
}
input, textarea, select { 
    background: #111; 
    border: 1px solid #444; 
    color: white; 
    padding: 8px; 
    width: 100%; 
    margin-bottom: 5px;
    border-radius: 4px;
    transition: border-color 0.2s;
}
.btn { 
    padding: 8px 16px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    color: white; 
    font-size: 0.9em;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary { background: #e14eca; }
.btn-primary:hover { background: #c0399f; }
.btn-success { background: #27ae60; }
.btn-success:hover { background: #229954; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; }
.btn-warning:hover { background: #d68910; }
.btn-dark { background: #444; }
.btn-dark:hover { background: #555; }
.btn-secondary { 
    background: #6c757d; 
}
.btn-secondary:hover { 
    background: #5a6268; 
}
.btn-small, .btn-sm { padding: 5px 10px; font-size: 0.85em; }
.btn-xs { padding: 2px 6px; font-size: 0.8em; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.opt-card { background: #333; padding: 15px; border: 1px solid #555; cursor: pointer; }
.opt-card:hover { border-color: #e14eca; }
.opt-card.INSTALL { border-top: 3px solid #27ae60; }
.opt-card.UPGRADE { border-top: 3px solid #3498db; }

/* Toolbar */
.tools { 
    display: flex; 
    gap: 10px; 
    align-items: center;
    flex-wrap: wrap;
}
.toolbar-button {
    display: flex;
    align-items: center;
    gap: 5px;
}
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .tools {
        width: 100%;
        justify-content: center;
    }
    .stats-mini {
        justify-content: center;
    }
}

/* Combat System */
.combat-form {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.combat-form h3 {
    color: #e14eca;
    margin-top: 0;
    border-bottom: 2px solid #e14eca;
    padding-bottom: 5px;
    margin-bottom: 15px;
}
.combat-form .form-group {
    margin-bottom: 10px;
}
.combat-result {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
    max-height: 500px;
    overflow-y: auto;
}
.combat-summary {
    background: #32364c;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.combat-summary h3 {
    color: #e14eca;
    margin-top: 0;
    border-bottom: 2px solid #e14eca;
    padding-bottom: 5px;
}
.combat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.stat-item {
    background: #27293d;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #444;
}
.stat-item.victory {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}
.stat-item.defeat {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
.stat-item strong {
    color: #e14eca;
    font-size: 1.1em;
}
.stat-item span {
    color: #aaa;
    margin-right: 5px;
}
.combat-log {
    background: #1e1e2f;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}
.combat-log h4 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 10px;
}
.log-entries {
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}
.log-entry {
    padding: 3px 0;
    border-bottom: 1px solid #333;
    color: #aaa;
}
.log-entry:last-child {
    border-bottom: none;
}
.combat-results-table {
    margin-top: 15px;
}
.combat-results-table h4 {
    color: #ffd700;
    margin-bottom: 10px;
}
.combat-table {
    width: 100%;
    border-collapse: collapse;
    background: #27293d;
    border-radius: 6px;
    overflow: hidden;
}
.combat-table thead {
    background: #1e1e2f;
}
.combat-table th {
    padding: 10px;
    text-align: left;
    color: #e14eca;
    border-bottom: 2px solid #444;
}
.combat-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #333;
}
.combat-table tbody tr:hover {
    background: #32364c;
}
.combat-table tbody tr.victory-row {
    background: rgba(39, 174, 96, 0.1);
}
.combat-table tbody tr.defeat-row {
    background: rgba(231, 76, 60, 0.1);
}
.balance-matrix {
    overflow-x: auto;
}
.balance-matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: #27293d;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.9em;
}
.balance-matrix-table thead {
    background: #1e1e2f;
}
.balance-matrix-table th {
    padding: 8px;
    text-align: center;
    color: #e14eca;
    border: 1px solid #444;
    min-width: 80px;
}
.balance-matrix-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #333;
    font-weight: bold;
}
.balance-matrix-table tbody tr:hover {
    background: #32364c;
}
.error {
    color: #e74c3c;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    border-radius: 4px;
    margin: 10px 0;
}

/* Улучшения для форм */
.form-group small {
    color: #888;
    font-size: 0.85em;
    margin-top: 3px;
    font-style: italic;
}

/* Улучшения для сетки слотов */
.slots-grid {
    min-height: 200px;
}

/* Улучшения для панели статистики (без скролла — всё помещается) */
.panel.stats {
    position: sticky;
    top: 20px;
}

.tab-view {
    padding: 10px 0;
}
.tab-view p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #333;
}
.tab-view hr {
    border: 0;
    border-top: 1px solid #444;
    margin: 15px 0;
}

/* Создание сети */
.net-creator {
    margin-top: 15px;
    padding: 15px;
    background: #2a2c3e;
    border-radius: 6px;
    display: none;
    flex-direction: column;
    gap: 10px;
    border: 2px solid #e14eca;
}
.net-creator span {
    color: #e14eca;
    font-weight: bold;
    text-align: center;
}
.net-cost-hint {
    color: #aaa;
    font-weight: normal;
    font-size: 0.9em;
}
.net-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Улучшения для карточек опций */
.opt-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.opt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.levelup-drop-single { margin: 1rem 0; }
.levelup-drop-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #333;
    padding: 1rem 1.25rem;
    border: 1px solid #555;
    border-radius: 8px;
}
.body-part-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a3e;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #e14eca;
}
.body-part-label { color: #aaa; font-size: 0.95rem; }
.drop-info { flex: 1; }

.opt-card.levelup-body-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}
.opt-card.levelup-body-opt.stage-install_1 {
    border: 2px dashed rgba(200, 200, 220, 0.7);
    background: rgba(80, 80, 96, 0.3);
}
.opt-card.levelup-body-opt.stage-install_2 {
    border: 2px solid rgba(230, 230, 245, 0.9);
    background: rgba(255, 255, 255, 0.05);
}
.opt-card.levelup-body-opt.stage-install_3 {
    border-width: 2px;
    border-style: solid;
    border-image: linear-gradient(135deg, #00c38a 0, #00c38a 50%, #10b981 50%, #10b981 100%) 1;
    background: rgba(0, 195, 138, 0.6);
}
.opt-card.levelup-body-opt.stage-rank_1 {
    border-width: 2px;
    border-style: solid;
    border-image: linear-gradient(135deg, #0ea5e9 0, #0ea5e9 50%, #38bdf8 50%, #38bdf8 100%) 1;
    background: rgba(53, 174, 252, 0.4);
}
.opt-card.levelup-body-opt.stage-rank_2 {
    border-width: 3px;
    border-style: solid;
    border-image: linear-gradient(135deg, #a855f7 0, #a855f7 33%, #ec4899 33%, #ec4899 66%, #6366f1 66%, #6366f1 100%) 1;
    background: rgba(168, 85, 247, 0.5);
}
.opt-card.levelup-body-opt.stage-rank_3 {
    border-width: 3px;
    border-style: solid;
    border-image: linear-gradient(135deg,
        #facc15 0, #facc15 25%,
        #fbbf24 25%, #fbbf24 50%,
        #fb923c 50%, #fb923c 75%,
        #f97316 75%, #f97316 100%
    ) 1;
    background: rgba(250, 204, 21, 0.55);
}
.levelup-combo-icon {
    margin-top: 4px;
    font-size: 1rem;
    letter-spacing: 1px;
}
.opt-card.levelup-body-opt .levelup-opt-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a3e;
    border-radius: 50%;
    color: #e14eca;
    font-size: 1.25rem;
    margin-bottom: 8px;
}
.opt-card.levelup-body-opt h4 { margin: 0 0 4px; font-size: 0.9rem; color: #aaa; }
.opt-card.levelup-body-opt .body-part-label { margin: 4px 0 0; }

/* Улучшения для инпутов */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #e14eca;
    box-shadow: 0 0 0 2px rgba(225, 78, 202, 0.2);
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1e1e2f;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Стили для информации о сети */
.mini-item {
    background: #32364c;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}
.net-info {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.net-info h2 {
    margin: 10px 0;
    font-size: 2em;
    color: #ffd700;
}
.net-items {
    margin: 10px 0;
}
.net-add {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}
.net-add label {
    display: block;
    margin-bottom: 8px;
    color: #e14eca;
    font-weight: bold;
}
.add-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.add-row select {
    flex: 1;
}

/* Кампания — основной режим (панель в layout) */
.campaign-panel .panel-head h2 {
    margin: 0;
}
.campaign-layout-inline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.campaign-state-wrap h3,
.campaign-doors h3,
.campaign-combat-log-wrap h3 {
    margin: 0 0 10px 0;
    color: #e14eca;
    font-size: 1em;
}
.campaign-combat-log-wrap {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}
.campaign-combat-log {
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    background: #1e1e2f;
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
}
.campaign-combat-log .log-entry {
    padding: 2px 0;
    border-bottom: 1px solid #333;
    color: #aaa;
}
.campaign-combat-log .log-entry:last-child {
    border-bottom: none;
}
.campaign-state-inner {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}
.campaign-state-inner p {
    margin: 6px 0;
}
.campaign-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.campaign-doors {
    background: #2a2c3e;
    padding: 15px;
    border-radius: 6px;
}
.campaign-doors h3 {
    margin-top: 0;
    color: #e14eca;
}
.door-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.door-btn {
    padding: 12px 20px;
    background: #32364c;
    border: 2px solid #555;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.door-btn:hover {
    border-color: #e14eca;
    background: #3d3d52;
}

/* Карточки выбора комнаты: зелёная / жёлтая / красная */
.door-card {
    flex: 1;
    min-width: 160px;
    max-width: 220px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.door-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.door-card .door-emoji { font-size: 1.6rem; line-height: 1; }
.door-card .door-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.door-card .door-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.25;
}
.door-card .door-reward {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.25);
}
.door-card-easy {
    border-color: #2d8a5e;
    background: linear-gradient(145deg, #1e3d2f 0%, #274d38 100%);
}
.door-card-easy .door-reward { color: #7bed9f; }
.door-card-medium {
    border-color: #c9a227;
    background: linear-gradient(145deg, #3d3519 0%, #4d4420 100%);
}
.door-card-medium .door-reward { color: #ffe066; }
.door-card-hard {
    border-color: #c0392b;
    background: linear-gradient(145deg, #3d1e1e 0%, #5c2a2a 100%);
}
.door-card-hard .door-reward { color: #ff6b6b; }
.door-boss-btn { font-weight: 600; }
.campaign-result {
    grid-column: 1 / -1;
    background: #1e1e2f;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}
.campaign-result-victory {
    color: #27ae60;
    font-weight: bold;
}
.campaign-result-defeat {
    color: #e74c3c;
    font-weight: bold;
}
.campaign-diff-select {
    background: #32364c;
    border: 1px solid #555;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
}
.campaign-diff-select:focus {
    outline: none;
    border-color: #e14eca;
}
.campaign-diff-hint {
    display: block;
    color: #888;
    font-size: 0.85em;
    margin-top: 4px;
}