/* EVE Inventory UI v2 - isolated overrides */
#modal-content.inventory-modal {
    width: 1240px !important;
    height: 800px !important;
    max-width: calc(100vw - 76px) !important;
    max-height: calc(100vh - 76px) !important;
    padding: 34px 38px 36px !important;
    display: flex;
    flex-direction: column;
}

#modal-content.inventory-modal #modal-title {
    flex: 0 0 auto;
    margin-bottom: 18px;
}

#modal-content.inventory-modal #modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.eve-inventory-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.eve-inventory-tab {
    position: relative;
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    overflow: hidden;
    color: rgba(196, 217, 227, .82);
    background: linear-gradient(180deg, rgba(20, 47, 64, .82), rgba(11, 29, 42, .86));
    border: 1px solid rgba(112, 184, 212, .22);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
}

.eve-inventory-tab::after {
    content: "";
    position: absolute;
    right: 12%;
    bottom: 0;
    left: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(109, 218, 237, .72), transparent);
    opacity: 0;
}

.eve-inventory-tab b {
    display: grid;
    min-width: 28px;
    height: 24px;
    place-items: center;
    padding: 0 7px;
    color: rgba(181, 219, 232, .84);
    background: rgba(3, 17, 26, .58);
    border: 1px solid rgba(117, 189, 214, .18);
    border-radius: 999px;
    font-size: 11px;
}

.eve-inventory-tab.is-active {
    color: #f5fdff;
    border-color: rgba(103, 211, 234, .7);
    background: linear-gradient(180deg, rgba(39, 99, 125, .9), rgba(20, 61, 82, .92));
    box-shadow: inset 0 0 0 1px rgba(156, 229, 243, .08), 0 0 20px rgba(49, 173, 204, .08);
}

.eve-inventory-tab.is-active::after { opacity: 1; }
.eve-inventory-tab.is-active b { color: #dffaff; border-color: rgba(118, 219, 238, .42); }

.eve-inventory-layout {
    display: grid;
    height: calc(100% - 66px);
    min-height: 0;
    grid-template-columns: 365px minmax(0, 1fr);
    gap: 14px;
}

.eve-inventory-list-panel,
.eve-inventory-detail {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(10, 31, 44, .92), rgba(7, 22, 33, .94));
    border: 1px solid rgba(103, 179, 207, .2);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.eve-inventory-list-panel::before,
.eve-inventory-detail::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image:
        linear-gradient(rgba(108, 187, 213, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 187, 213, .08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.eve-inventory-list-panel {
    display: flex;
    flex-direction: column;
}

.eve-inventory-category-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    min-height: 112px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px 15px;
    background: rgba(18, 48, 64, .55);
    border-bottom: 1px solid rgba(111, 186, 212, .16);
}

.eve-inventory-category-head small {
    display: block;
    color: #6cb8cf;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
}

.eve-inventory-category-head strong {
    display: block;
    margin-top: 3px;
    color: #f0f9fc;
    font-size: 18px;
}

.eve-inventory-category-head p {
    max-width: 250px;
    margin: 5px 0 0;
    color: rgba(176, 202, 213, .72);
    font-size: 11px;
    line-height: 1.45;
}

.eve-inventory-category-head > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: rgba(179, 221, 232, .9);
    background: rgba(7, 28, 39, .76);
    border: 1px solid rgba(113, 192, 216, .2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.eve-inventory-list-scroll {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.eve-inventory-list-scroll::-webkit-scrollbar,
.eve-inventory-detail-scroll::-webkit-scrollbar { width: 8px; }
.eve-inventory-list-scroll::-webkit-scrollbar-track,
.eve-inventory-detail-scroll::-webkit-scrollbar-track { background: rgba(4, 15, 23, .42); border-radius: 999px; }
.eve-inventory-list-scroll::-webkit-scrollbar-thumb,
.eve-inventory-detail-scroll::-webkit-scrollbar-thumb { background: rgba(90, 181, 208, .44); border-radius: 999px; }

.eve-inventory-list-item {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 68px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 0 0 8px;
    padding: 9px 11px;
    color: #dbeaf0;
    text-align: left;
    background: linear-gradient(90deg, rgba(19, 52, 69, .72), rgba(14, 38, 52, .62));
    border: 1px solid rgba(112, 184, 209, .14);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.eve-inventory-list-item:hover {
    border-color: rgba(102, 205, 229, .42);
    background: linear-gradient(90deg, rgba(27, 68, 87, .82), rgba(16, 45, 60, .72));
}

.eve-inventory-list-item.is-active {
    border-color: rgba(106, 220, 239, .72);
    background: linear-gradient(90deg, rgba(34, 88, 110, .9), rgba(18, 52, 68, .82));
    box-shadow: inset 3px 0 0 rgba(106, 224, 240, .78), 0 0 18px rgba(45, 165, 194, .08);
}

.eve-inventory-list-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #b7edf2;
    background: rgba(4, 23, 34, .82);
    border: 1px solid rgba(105, 200, 224, .34);
    border-radius: 9px;
    font-size: 23px;
}

.eve-inventory-list-copy {
    display: block;
    min-width: 0;
}

.eve-inventory-list-copy strong,
.eve-inventory-list-copy small { display: block; }
.eve-inventory-list-copy strong { overflow: hidden; color: #edf8fb; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.eve-inventory-list-copy small { margin-top: 4px; overflow: hidden; color: rgba(139, 183, 199, .78); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.eve-inventory-list-item em {
    min-width: 34px;
    padding: 4px 7px;
    color: rgba(187, 222, 232, .82);
    background: rgba(2, 15, 23, .58);
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
}

.eve-inventory-empty-list,
.eve-inventory-detail.is-empty {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100%;
    min-height: 260px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: rgba(135, 171, 185, .74);
    text-align: center;
}

.eve-inventory-empty-list > div,
.eve-inventory-empty-icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 14px;
    place-items: center;
    color: rgba(133, 207, 224, .62);
    border: 1px solid rgba(108, 185, 210, .2);
    border-radius: 14px;
    background: rgba(11, 38, 50, .52);
    font-size: 30px;
}

.eve-inventory-empty-list strong,
.eve-inventory-detail.is-empty strong { color: #d9e8ed; font-size: 15px; }
.eve-inventory-empty-list p,
.eve-inventory-detail.is-empty p { max-width: 360px; margin: 8px 0 0; font-size: 11px; line-height: 1.6; }

.eve-inventory-detail {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.eve-inventory-detail-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
    padding: 22px 24px 20px;
    background: linear-gradient(90deg, rgba(20, 57, 74, .72), rgba(11, 33, 46, .48));
    border-bottom: 1px solid rgba(113, 188, 212, .16);
}

.eve-inventory-detail-icon {
    display: grid;
    width: 82px;
    height: 82px;
    margin: 0;
    flex: 0 0 82px;
    place-items: center;
    color: #bff1f3;
    background: radial-gradient(circle at 45% 38%, rgba(68, 151, 174, .38), rgba(8, 36, 49, .84));
    border: 1px solid rgba(111, 208, 228, .46);
    border-radius: 16px;
    box-shadow: inset 0 0 24px rgba(77, 186, 207, .08);
    font-size: 39px;
}

.eve-inventory-detail-heading { min-width: 0; }
.eve-inventory-detail-heading small { display: block; color: #71bad0; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.eve-inventory-detail-heading h3 { margin: 5px 0 7px; color: #f4fbfd; font-size: 27px; line-height: 1.15; }

.eve-inventory-status-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 9px;
    color: #bce7ee;
    background: rgba(33, 90, 108, .5);
    border: 1px solid rgba(103, 198, 218, .28);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.eve-inventory-detail-scroll {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 24px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.eve-inventory-description-block,
.eve-inventory-note-block {
    padding: 17px 18px;
    background: rgba(12, 37, 50, .56);
    border: 1px solid rgba(109, 183, 208, .14);
    border-radius: 11px;
}

.eve-inventory-description-block > span,
.eve-inventory-note-block > span {
    display: block;
    color: #68b7cd;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .18em;
}

.eve-inventory-description-block p,
.eve-inventory-note-block p {
    min-height: 0;
    margin: 8px 0 0;
    color: rgba(211, 229, 235, .85);
    font-size: 13px;
    line-height: 1.65;
}

.eve-inventory-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 12px 0;
}

.eve-inventory-meta-grid > div {
    display: grid;
    min-height: 62px;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    background: rgba(255, 255, 255, .027);
    border: 1px solid rgba(111, 180, 204, .1);
    border-radius: 9px;
}

.eve-inventory-meta-grid dt { color: rgba(115, 171, 190, .86); font-size: 11px; font-weight: 900; }
.eve-inventory-meta-grid dd { margin: 0; color: #e6f1f4; font-size: 12px; font-weight: 700; }

.eve-inventory-note-block { min-height: 98px; }

.eve-inventory-detail-actions {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 14px 24px 18px;
    background: rgba(7, 25, 36, .86);
    border-top: 1px solid rgba(111, 185, 210, .14);
}

.eve-inventory-primary {
    width: 100%;
    min-height: 50px;
    color: #f3fcff;
    background: linear-gradient(180deg, rgba(37, 102, 129, .94), rgba(20, 65, 87, .96));
    border: 1px solid rgba(106, 211, 233, .48);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.eve-inventory-primary:hover:not(:disabled) { filter: brightness(1.08); }
.eve-inventory-primary:disabled { opacity: .42; cursor: default; }

@media (max-width: 1050px) {
    #modal-content.inventory-modal {
        width: calc(100vw - 36px) !important;
        height: calc(100vh - 36px) !important;
        max-width: none !important;
        max-height: none !important;
        padding: 26px 24px !important;
    }

    .eve-inventory-layout { grid-template-columns: 310px minmax(0, 1fr); }
    .eve-inventory-meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .eve-inventory-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 36%) minmax(0, 1fr);
    }

    .eve-inventory-category-head { min-height: 88px; }
    .eve-inventory-tabs { gap: 6px; }
    .eve-inventory-tab { padding: 8px; font-size: 12px; }
    .eve-inventory-detail-header { padding: 14px 16px; }
    .eve-inventory-detail-icon { width: 62px; height: 62px; flex-basis: 62px; font-size: 30px; }
    .eve-inventory-detail-heading h3 { font-size: 21px; }
    .eve-inventory-detail-scroll { padding: 14px 16px 16px; }
}
