/* EVE Industrial Tool – Custom Styles */

body {
    background-color: #0a0a0f;
    min-height: 100vh;
}

.navbar {
    backdrop-filter: blur(10px);
    background: rgba(13, 13, 20, 0.95) !important;
}

.card {
    border-radius: 8px;
}

.table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.table th {
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 1;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Scrollbar */
.table-responsive {
    max-height: 65vh;
    overflow-y: auto;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #3a3a5e;
    border-radius: 4px;
}

/* Sync spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    background: transparent;
    border-color: #3a3a5e;
    color: #ccc;
}

.page-link:hover {
    background: #2a2a4e;
    color: #fff;
}

.page-item.active .page-link {
    background: #0d6efd;
    border-color: #0d6efd;
}

/* Filter dropdowns */
.form-select, .form-control {
    background-color: #1a1a2e;
    border-color: #3a3a5e;
    color: #ddd;
}

.form-select:focus, .form-control:focus {
    background-color: #1a1a2e;
    border-color: #0d6efd;
    color: #fff;
}

/* Character list */
#characterList .character-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

#characterList .character-item:hover {
    background: #1e1e3a;
}

#characterList .character-item.active {
    background: #0d6efd33;
    border-color: #0d6efd66;
}

#characterList .character-item .char-name {
    font-weight: 500;
    font-size: 0.9rem;
}

#characterList .character-item .char-corp {
    font-size: 0.75rem;
    color: #888;
}

/* Item type badges */
.badge-category {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-ship { background: #2d5a27; }
.badge-module { background: #2a4a6a; }
.badge-charge { background: #6a4a2a; }
.badge-drone { background: #5a2a6a; }
.badge-material { background: #5a5a2a; }
.badge-blueprint { background: #2a5a5a; }
.badge-implant { background: #6a2a2a; }
.badge-structure { background: #2a2a6a; }

/* Stats cards */
#statsBar .card {
    border-radius: 6px;
}

/* ── Division Cards ──────────────────────────────────────────── */

#divisionCardsContainer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.division-card {
    background: #16162a;
    border: 1px solid #2a2a4e;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
    user-select: none;
}

.division-card:hover {
    background: #1e1e3a;
    border-color: #3a3a6e;
    transform: translateY(-1px);
}

.division-card.active {
    background: #0d6efd22;
    border-color: #0d6efd88;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.15);
}

.division-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
}

.division-card-count {
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

/* ── Category Pills ──────────────────────────────────────────── */

#categoryPills .btn {
    font-size: 0.78rem;
    padding: 2px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

#categoryPills .btn.active {
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(13, 110, 253, 0.3);
}

#categoryPills .btn-outline-cyan {
    color: #17a2b8;
    border-color: #17a2b8;
}

#categoryPills .btn-outline-cyan:hover,
#categoryPills .btn-outline-cyan.active {
    color: #fff;
    background: #17a2b8;
    border-color: #17a2b8;
}

/* ── Corp Column ─────────────────────────────────────────────── */

.corp-col {
    display: none;
}

/* ── Meta Group Badges ────────────────────────────────────────── */

.badge-meta {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-meta-t1 {
    background: #2a4a6a;
    color: #8ab8e0;
}

.badge-meta-t2 {
    background: #4a2a6a;
    color: #b88ae0;
}

.badge-meta-faction {
    background: #4a6a2a;
    color: #b8e08a;
}

.badge-meta-officer {
    background: #6a4a2a;
    color: #e0b88a;
}

/* ── Mobile table column overrides (7 columns now) ────────────── */

@media (max-width: 768px) {
    .table td:nth-child(4),
    .table th:nth-child(4),
    .table td:nth-child(5),
    .table th:nth-child(5),
    .table td:nth-child(6),
    .table th:nth-child(6) {
        display: none;
    }
}

/* ── Responsive tweaks ───────────────────────────────────────── */

@media (max-width: 768px) {
    .table td:nth-child(4),
    .table th:nth-child(4),
    .table td:nth-child(5),
    .table th:nth-child(5) {
        display: none;
    }

    .division-card {
        min-width: 90px;
        padding: 8px 12px;
    }

    #categoryPills .btn {
        font-size: 0.7rem;
        padding: 1px 8px;
    }
}

/* ── Restock Calculator ──────────────────────────────────────── */

.restock-list-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.restock-list-card:hover {
    border-color: #0d6efd66;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Item suggestions dropdown */
#addItemSuggestions {
    max-height: 200px;
    overflow-y: auto;
    background: #1a1a2e;
    border: 1px solid #3a3a5e;
    border-radius: 4px;
}

.suggestion-item {
    padding: 6px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a4e;
    transition: background 0.15s;
}

.suggestion-item:hover {
    background: #0d6efd33;
}

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

/* Restock summary stats */
#restockSummaryBar .card {
    border-radius: 6px;
}

/* Buy text modal textarea */
#buyTextArea {
    font-size: 0.85rem;
    line-height: 1.5;
    tab-size: 2;
}

/* Restock table column widths */
#restockTable th {
    white-space: nowrap;
}
