/**
 * EVE Member Dashboard - SEAT-like Interface
 * @since 1.0.0
 */

/* Ensure WordPress menu dropdowns appear above member dashboard */
.dropdown-menu,
.sub-menu,
nav .dropdown,
header .dropdown-menu {
    z-index: 99999 !important;
}

/* Container */
.eve-member-dashboard {
    background: #1a1d23;
    color: #e8e8e8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
    border-bottom: none;
}

.dashboard-header h1 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.header-left {
    flex: 0 0 auto;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Character Switcher */
.character-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.character-switcher label {
    font-weight: 500;
    color: #b0b0b0;
}

.character-switcher select {
    background: #2a2f38;
    color: #fff;
    border: 1px solid #3a3f48;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Main Content Layout */
.dashboard-content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

/* Sidebar */
.dashboard-sidebar {
    background: #21252b;
    border-radius: 8px;
    padding: 15px;
}

.character-list-panel h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #fff;
    border-bottom: 2px solid #2a2f38;
    padding-bottom: 8px;
}

/* Character List */
.character-list {

}

.character-list-item {
    position: relative;
    background: #2a2f38;
    border-radius: 6px;
    margin-bottom: 1px;
    transition: all 0.2s;
    border: 2px solid transparent;
    padding-bottom: 14px;
}

.character-list-item:hover {
    background: #333a45;
    border-color: #9b59b6;
}

.character-list-item.active {
    background: #2e3441;
    border-color: #9b59b6;
    box-shadow: 0 0 0 1px rgba(155, 89, 182, 0.3);
}

/* Primary character active state - blue border */
.character-list-item.active:has(.primary-badge) {
    border-color: #5a9de8;
    box-shadow: 0 0 0 1px rgba(90, 157, 232, 0.3);
}

.character-list-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.character-list-item a,
.character-list-item a * {
    outline: 0 !important;
    border: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}
.eve-member-dashboard .character-portrait {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    overflow: visible;
    align-self: center;
    display: flex;
    align-items: center;
}

.eve-member-dashboard .character-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 2px solid #3a3f48;
    display: block;
}

.eve-member-dashboard .character-list-item.active .character-portrait img {
    border-color: #9b59b6;
}

.eve-member-dashboard .character-list-item.active:has(.primary-badge) .character-portrait img {
    border-color: #5a9de8;
}

.character-info {
    flex: 1;
    min-width: 0;
}

.character-name {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eve-member-dashboard .primary-badge {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    background: #5a9de8;
    color: #fff;
    font-size: 8px;
    padding: 3px 4px;
    border-radius: 0 0 4px 4px;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.eve-member-dashboard .alt-badge {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    background: #9b59b6;
    color: #fff;
    font-size: 8px;
    padding: 3px 4px;
    border-radius: 0 0 4px 4px;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.character-corp {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-character-btn {
    position: absolute;
    bottom: 50%;
    right: 8px;
    transform: translateY(50%);
    background: #dc3545;
    color: #fff;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 11px;
    line-height: 1;
    z-index: 20;
}

.character-list-item:hover .remove-character-btn {
    opacity: 1;
}

.remove-character-btn:hover {
    background: #c82333;
}

/* Add Character Section */
.add-character-section {
    display: flex;
}

.add-character-section .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
}

.add-character-section .button .dashicons {
    font-size: 18px;
}

.button-block {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-weight: 600;
}

/* Main Panel */
.dashboard-main {
    background: #21252b;
    border-radius: 8px;
    padding: 30px;
}

/* Character Details */
.character-details-panel {
}

.character-header-section {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    padding-bottom: 0;
    border-bottom: none;
}

.character-portrait-large img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    border: 3px solid #3a3f48;
}

.character-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.character-header-info h2 {
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
}

.affiliation {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    color: #d0d0d0;
}

.corp-logo,
.alliance-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.verification-badge-large {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
    font-size: 14px;
    text-transform: uppercase;
}

.verification-badge-large.clean {
    background: #28a745;
    color: #fff;
}

.verification-badge-large.minor {
    background: #ffc107;
    color: #333;
}

.verification-badge-large.moderate {
    background: #ff9800;
    color: #fff;
}

.verification-badge-large.severe {
    background: #dc3545;
    color: #fff;
}

/* Alt Characters Section */
.alt-characters-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #1e2329;
    border-radius: 8px;
}

.alt-characters-section h3 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 18px;
}

/* Add Character Button */
.eve-btn {
    background: #5a9de8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.eve-btn:hover {
    background: #4a8dd8;
    text-decoration: none !important;
}

.eve-btn-primary {
    background: #5a9de8;
}

.eve-btn-primary:hover {
    background: #4a8dd8;
}

.alt-characters-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.alt-character-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 5px;
    border-color: #9b59b6;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 200px;
    position: relative;
}

.alt-character-card:hover {
    background: #333a45;
    border-color: #9b59b6;
    text-decoration: none !important;
}

.alt-character-card.active {
    border-color: #9b59b6;
    background: #333a45;
}

/* Primary Character Card - Blue Styling */
.alt-character-card.primary-character-card {
    border: 3px solid transparent;
}

.alt-character-card.primary-character-card:hover {
    border-color: #3a7bc8;
}

.alt-character-card.primary-character-card.active {
    border-color: #3a7bc8;
}

.alt-character-card.primary-character-card .alt-character-portrait img {
    border: 2px solid #3a7bc8 !important;
}

/* Remove Character Button on Cards */
.remove-character-card-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    transform: none;
    background: #dc3545;
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.alt-character-card:hover .remove-character-card-btn {
    opacity: 1;
}

.remove-character-card-btn:hover {
    background: #c82333;
}

.alt-character-portrait {
    flex-shrink: 0;
}

.alt-character-portrait img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #9b59b6 !important;
}

.alt-character-info {
    flex: 1;
}

.alt-character-name {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.alt-character-corp {
    color: #b0b0b0;
    font-size: 11px;
}

/* Stats Tabs */
.eve-member-dashboard .stats-tabs {
    margin-top: 30px;
}

.eve-member-dashboard .tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.eve-member-dashboard .tab-btn {
    background: #2a2f38;
    border: 1px solid #3a3f48;
    border-radius: 999px;
    color: #9ca3af;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.eve-member-dashboard .tab-btn:hover {
    color: #fff;
    background: #333a45;
    border-color: #5a9de8;
}

.eve-member-dashboard .tab-btn.active {
    color: #fff;
    background: #5a9de8;
    border-color: #5a9de8;
}

.eve-member-dashboard .tab-content {
    display: none;
    padding: 20px 0;
}

.eve-member-dashboard .tab-content.active {
    display: block;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.overview-card {
    background: #1e2329;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #5a9de8;
}

.overview-card.pvp-card {
    border-left-color: #dc3545;
}

.overview-card.pve-card {
    border-left-color: #28a745;
}

.overview-card.mining-card {
    border-left-color: #ff9800;
}

.overview-card h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.overview-card.pvp-card h3 {

}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.stat-row span {
    color: #9ca3af;
    font-size: 13px;
}

.stat-row strong {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* Detailed Stats Grid */
.detailed-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: #2a2f38;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.stat-box .label {
    display: block;
    color: #b0b0b0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-box .value {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

/* Period Selector */
.stats-period-selector {
    margin-bottom: 20px;
}

.stats-period-selector select {
    background: #2a2f38;
    color: #fff;
    border: 1px solid #3a3f48;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Favorite Info */
.favorite-info {
    background: #2a2f38;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.favorite-info h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 16px;
}

.favorite-info p {
    margin: 0;
    color: #d0d0d0;
}

/* Character Stats Grid */
.eve-member-dashboard {
    background-color: #000000 !important;
}

.eve-member-dashboard .character-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.eve-member-dashboard .stat-card {
    background: #2a2f38;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.eve-member-dashboard .stat-label {
    display: block;
    color: #b0b0b0;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.eve-member-dashboard .stat-value {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.eve-member-dashboard .stat-sub {
    display: block;
    color: #9ca3af;
    font-size: 12px;
}

/* Status Pills */
.eve-member-dashboard .character-status-pills {
    display: flex;
    gap: 8px;
    margin-top: 0;
    flex-wrap: wrap;
}

.eve-member-dashboard .status-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 13px;
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eve-member-dashboard .status-pill.is-online {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.eve-member-dashboard .status-pill.is-offline {
    background: rgba(108, 117, 125, 0.15);
    color: #9ca3af;
    border-color: rgba(108, 117, 125, 0.3);
}

/* Data Tables */
.eve-member-dashboard .data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #2a2f38;
    border-radius: 8px;
    overflow: hidden;
}

.eve-member-dashboard .data-table thead {
    background: #21252b;
}

.eve-member-dashboard .data-table th {
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #3a3f48;
}

.eve-member-dashboard .data-table td {
    padding: 12px;
    border-bottom: 1px solid #3a3f48;
    color: #d0d0d0;
}

.eve-member-dashboard .data-table tbody tr:last-child td {
    border-bottom: none;
}

.eve-member-dashboard .data-table tbody tr:hover {
    background: #323842;
}

/* Tab Content Sections */
.eve-member-dashboard .no-data {
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.eve-member-dashboard .skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eve-member-dashboard .skills-list li {
    padding: 10px;
    background: #2a2f38;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eve-member-dashboard .skill-name {
    color: #fff;
    font-weight: 500;
}

.eve-member-dashboard .skill-level {
    color: #5a9de8;
    font-weight: 600;
}

.eve-member-dashboard .skill-sp {
    color: #9ca3af;
    font-size: 12px;
}

.eve-member-dashboard .implants-list {
    list-style: none;
    padding: 0;
}

.eve-member-dashboard .implants-list li {
    padding: 8px;
    background: #2a2f38;
    border-radius: 4px;
    margin-bottom: 5px;
    color: #d0d0d0;
}

.eve-member-dashboard .badge-buy {
    background: #28a745;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.eve-member-dashboard .badge-sell {
    background: #dc3545;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.eve-member-dashboard .verification-clean {
    color: #28a745;
}

.eve-member-dashboard .verification-minor {
    color: #ffc107;
}

.eve-member-dashboard .verification-moderate {
    color: #ff9800;
}

.eve-member-dashboard .verification-severe {
    color: #dc3545;
}

/* Verification Detail */
.verification-detail {
    background: #2a2f38;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #5a9de8;
}

.verification-detail.clean {
    border-left-color: #28a745;
}

.verification-detail.minor {
    border-left-color: #ffc107;
}

.verification-detail.moderate {
    border-left-color: #ff9800;
}

.verification-detail.severe {
    border-left-color: #dc3545;
}

.verification-detail h3 {
    margin: 0 0 15px 0;
    color: #fff;
}

.verification-detail h4 {
    margin: 15px 0 10px 0;
    color: #fff;
}

.verification-detail ul {
    list-style: none;
    padding: 0;
}

.verification-detail li {
    padding: 8px 0;
    border-bottom: 1px solid #3a3f48;
    color: #d0d0d0;
}

/* No Character State */
.eve-member-dashboard.no-character {
    text-align: center;
    padding: 60px 20px;
}

.no-character-message {
    max-width: 500px;
    margin: 0 auto;
}

.eve-logo {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
}

.no-character-message h2 {
    color: #fff;
    margin-bottom: 20px;
}

.no-character-message p {
    color: #b0b0b0;
    font-size: 16px;
    margin-bottom: 15px;
}

.no-character-message .error {
    color: #dc3545;
    font-weight: 600;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

.button-primary {
    background: #5a9de8;
    color: #fff;
}

.button-primary:hover {
    background: #4a8dd8;
}

.button-secondary {
    background: #6c757d;
    color: #fff;
}

.button-secondary:hover {
    background: #5a6268;
}

.button-large {
    padding: 15px 30px;
    font-size: 16px;
}

.dashicons {
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

/* Login State */
.eve-member-dashboard-login {
    text-align: center;
    padding: 60px 20px;
    background: #21252b;
    border-radius: 8px;
}

.eve-member-dashboard-login h2 {
    color: #fff;
    margin-bottom: 15px;
}

.eve-member-dashboard-login p {
    color: #b0b0b0;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        order: 2;
        margin-top: 20px;
    }

    .dashboard-main {
        order: 1;
    }

    .character-header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Keep overview cards in 3 columns on tablet landscape */
    .overview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }

    .character-switcher {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .character-switcher select {
        width: 100%;
    }

    .add-character-section {
        width: 100%;
        margin-top: 10px;
    }

    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        order: 2;
    }

    .dashboard-main {
        order: 1;
        padding: 20px;
    }

    /* Stack overview cards on mobile */
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detailed-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .character-portrait-large img {
        width: 150px;
        height: 150px;
    }

    .character-header-info h2 {
        font-size: 28px;
    }

    .character-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .eve-member-dashboard {
        padding: 10px;
    }

    .dashboard-main {
        padding: 15px;
    }

    .dashboard-header h1 {
        font-size: 22px;
    }

    .header-right {
        width: 100%;
    }

    .detailed-stats-grid {
        grid-template-columns: 1fr;
    }

    .character-stats-grid {
        grid-template-columns: 1fr;
    }

    .tab-nav {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tab-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .character-portrait-large img {
        width: 120px;
        height: 120px;
    }

    .overview-card {
        padding: 15px;
    }

    .overview-card h3 {
        font-size: 14px;
    }

    .stat-row {
        padding: 8px 0;
    }
}

/* --- Theme Template Layout Overrides --- */
.eve-member-dashboard.theme-layout {
    background: transparent;
    color: var(--text-secondary, #d7dbe7);
    padding: 0;
    margin: 40px 0;
    font-family: inherit;
}

.members-content .eve-member-dashboard.theme-layout .dashboard-header,
.members-content .eve-member-dashboard.theme-layout .dashboard-sidebar,
.members-content .eve-member-dashboard.theme-layout .dashboard-main {
    background: var(--bg-card, rgba(10, 12, 18, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.eve-member-dashboard.theme-layout .dashboard-header {
    border-radius: 16px;
    padding: 24px 32px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.eve-member-dashboard.theme-layout .dashboard-header h1 {
    font-size: 36px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary, #fff);
    margin: 0;
}

.eve-member-dashboard.theme-layout .character-switcher label {
    color: var(--text-muted, #9ca3af);
}

.eve-member-dashboard.theme-layout .character-switcher select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #fff);
    border-radius: 999px;
    min-width: 220px;
}

.eve-member-dashboard.theme-layout .dashboard-content {
    margin-top: 24px;
    gap: 24px;
}

.eve-member-dashboard.theme-layout .dashboard-sidebar,
.eve-member-dashboard.theme-layout .dashboard-main {
    border-radius: 18px;
    padding: 24px;
}

.eve-member-dashboard.theme-layout .character-list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.eve-member-dashboard.theme-layout .character-list-item.active {
    background: linear-gradient(135deg, var(--accent-blue, #54acfa), var(--accent-cyan, #00d4ff));
    box-shadow: 0 10px 30px rgba(84, 172, 250, 0.3);
}

.eve-member-dashboard.theme-layout .character-name {
    font-size: 15px;
    letter-spacing: 0.03em;
}

.eve-member-dashboard.theme-layout .character-meta {
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.eve-member-dashboard.theme-layout .dashboard-main h2 {
    color: var(--text-primary, #fff);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eve-member-dashboard.theme-layout .overview-grid .stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

.eve-member-dashboard.theme-layout .stat-card h4 {
    color: var(--text-muted, rgba(255, 255, 255, 0.7));
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.eve-member-dashboard.theme-layout .stat-card .stat-value {
    font-size: 32px;
    color: var(--text-primary, #fff);
}

.eve-member-dashboard.theme-layout .tab-panel {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.01);
}

.eve-member-dashboard.theme-layout .tab-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #fff);
    background: transparent;
}

.eve-member-dashboard.theme-layout .tab-btn.active {
    background: linear-gradient(135deg, var(--accent-blue, #54acfa), var(--accent-cyan, #00d4ff));
    border-color: transparent;
    color: #0b1220;
    font-weight: 600;
}

.eve-member-dashboard.theme-layout .skill-progress .progress-bar {
    background: rgba(255, 255, 255, 0.08);
}

.eve-member-dashboard.theme-layout .skill-progress .progress-fill {
    background: linear-gradient(90deg, var(--accent-blue, #54acfa), var(--accent-cyan, #00d4ff));
}

.eve-member-dashboard.theme-layout .detailed-stats-grid .stat-section,
.eve-member-dashboard.theme-layout .wallet-panel,
.eve-member-dashboard.theme-layout .mail-panel {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.eve-member-dashboard.theme-layout .wallet-panel h3,
.eve-member-dashboard.theme-layout .mail-panel h3,
.eve-member-dashboard.theme-layout .contracts-panel h3 {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary, #fff);
}

.eve-member-dashboard.theme-layout .button.button-primary {
    border-radius: 999px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-blue, #54acfa), var(--accent-cyan, #00d4ff));
    border: none;
    color: #080c14;
    font-weight: 600;
}

.eve-member-dashboard.theme-layout .button.button-secondary {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--text-primary, #fff);
}

.eve-member-dashboard.theme-layout .eve-mail-modal__dialog {
    background: var(--bg-card, rgba(4, 6, 12, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.eve-member-dashboard-login.theme-layout {
    background: var(--bg-card, rgba(14, 16, 24, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
}

/* ==============================================
   NEW TABS - Skills, Mining, Fittings, PI
   ============================================== */

/* Skills Tab */
.skills-content {
    padding: 10px 0;
}

.skills-summary {
    background: #21252b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #2a2f38;
}

.skills-summary h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

.summary-stats {
    display: flex;
    gap: 30px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-stat .stat-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat strong {
    font-size: 20px;
    color: #5a9de8;
}

.skill-category {
    background: #21252b;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    border: 1px solid #2a2f38;
}

.skill-category h4 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2f38;
    padding-bottom: 10px;
}

.skill-category .category-meta {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.skill-category .skills-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.skill-category .skills-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #2a2f38;
    border-radius: 4px;
    font-size: 12px;
}

.skill-category .skills-list .skill-name {
    color: #e8e8e8;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skill-category .skills-list .skill-level {
    color: #5a9de8;
    font-weight: 600;
    margin: 0 10px;
    white-space: nowrap;
}

.skill-category .skills-list .skill-sp {
    color: #9ca3af;
    font-size: 11px;
    white-space: nowrap;
}

/* Mining Tab */
.mining-content {
    padding: 10px 0;
}

.mining-content h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

/* Fittings Tab */
.fittings-content {
    padding: 10px 0;
}

.fittings-content h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

/* PI Tab */
.pi-content {
    padding: 10px 0;
}

.pi-content h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

.pi-content h3:not(:first-child) {
    margin-top: 25px;
}

/* Responsive for new tabs */
@media (max-width: 768px) {
    .summary-stats {
        flex-direction: column;
        gap: 15px;
    }

    .skill-category .skills-list {
        grid-template-columns: 1fr;
    }

    .skill-category .skills-list li {
        flex-wrap: wrap;
    }

    .skill-category .skills-list .skill-name {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }

    .mining-content .data-table,
    .fittings-content .data-table,
    .pi-content .data-table {
        font-size: 12px;
    }

    .mining-content .data-table th,
    .mining-content .data-table td,
    .fittings-content .data-table th,
    .fittings-content .data-table td,
    .pi-content .data-table th,
    .pi-content .data-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .skill-category {
        padding: 12px 15px;
    }

    .skill-category h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .summary-stat strong {
        font-size: 18px;
    }
}

/* ==============================================
   SHOW MORE / PAGINATION
   ============================================== */

.eve-member-dashboard .eve-section-header,
.eve-member-dashboard .mail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.eve-member-dashboard .eve-section-header h3,
.eve-member-dashboard .mail-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.show-more-toggle {
    background: #2a2f38;
    border: 1px solid #3a3f48;
    color: #5a9de8;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.show-more-toggle:hover {
    background: #333a45;
    border-color: #5a9de8;
}

.show-more-toggle.expanded {
    background: #5a9de8;
    color: #fff;
    border-color: #5a9de8;
}

.hidden-row {
    display: none;
}

/* ==============================================
   MAIL ITEMS & MODAL
   ============================================== */

.mail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mail-item {
    background: #21252b;
    border: 1px solid #2a2f38;
    border-radius: 8px;
    padding: 15px;
    transition: border-color 0.2s;
}

.mail-item:hover {
    border-color: #3a3f48;
}

.mail-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.mail-item-info {
    flex: 1;
    min-width: 0;
}

.mail-subject {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.mail-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.mail-preview {
    font-size: 13px;
    color: #b0b0b0;
    margin: 0;
    line-height: 1.4;
}

.mail-actions {
    flex-shrink: 0;
}

.mail-read-btn {
    background: #5a9de8;
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mail-read-btn:hover {
    background: #4a8dd8;
}

.mail-template {
    display: none;
}

/* Mail Modal */
.eve-mail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.eve-mail-modal-dialog {
    background: #1a1d23;
    border: 1px solid #3a3f48;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.eve-mail-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-bottom: 1px solid #2a2f38;
}

.eve-mail-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.eve-mail-modal-close:hover {
    color: #fff;
}

.eve-mail-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.eve-mail-modal-body header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2f38;
}

.eve-mail-modal-body header h2 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 20px;
}

.eve-mail-modal-body .mail-template-meta {
    margin: 0;
    color: #9ca3af;
    font-size: 13px;
}

.eve-mail-modal-body .mail-body-content {
    color: #e8e8e8;
    font-size: 14px;
    line-height: 1.6;
}

.eve-mail-modal-body .mail-body-content p {
    margin: 0 0 12px 0;
}

.eve-mail-modal-body .mail-body-content a {
    color: #5a9de8;
}

/* Responsive for mail */
@media (max-width: 768px) {
    .mail-item-header {
        flex-direction: column;
        gap: 10px;
    }

    .mail-actions {
        width: 100%;
    }

    .mail-read-btn {
        width: 100%;
    }

    .eve-mail-modal-dialog {
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .section-header,
    .mail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .show-more-toggle {
        width: 100%;
        text-align: center;
    }
}

/* Scope Status Styling */
.scope-warning-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff9800;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.scope-warning-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.character-info .scope-status {
    margin-top: 4px;
}

.character-info .scope-warning {
    color: #ff9800;
    font-size: 11px;
    font-weight: 500;
}

/* Scope Status Alert */
.scope-status-alert {
    background: #2a2f38;
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.scope-status-alert .alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.scope-status-alert .alert-header .dashicons {
    color: #ff9800;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.scope-status-alert .alert-header h3 {
    margin: 0;
    color: #ff9800;
    font-size: 18px;
}

.scope-status-alert p {
    color: #e8e8e8;
    margin: 0 0 15px 0;
}

.scope-status-alert .button {
    background: #ff9800;
    border-color: #ff9800;
    color: #fff;
    padding: 8px 20px;
    font-weight: 600;
}

.scope-status-alert .button:hover {
    background: #f57c00;
    border-color: #f57c00;
}

.scope-status-alert details {
    background: #1a1d23;
    border-radius: 4px;
    padding: 10px;
}

.scope-status-alert details summary {
    font-weight: 500;
    color: #b0b0b0;
}

.scope-status-alert details ul {
    margin: 10px 0;
}

.scope-status-alert details li {
    color: #9ca3af;
    margin: 4px 0;
}

/* Scope Update Message */
.scope-update-message {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.scope-update-message.success {
    background: #4caf50;
    color: #fff;
}

.scope-update-message.error {
    background: #f44336;
    color: #fff;
}

/* ========================================
   ASSETS - Location Groups & Compact Tables
   ======================================== */

/* Assets Summary Bar */
.assets-summary {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: #2a2d35;
    border-radius: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.assets-summary .summary-item {
    color: #9ca3af;
    font-size: 13px;
}

.assets-summary .summary-item strong {
    color: #4fc3f7;
}

/* Location Group Container */
.asset-location-group {
    margin-bottom: 8px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    overflow: hidden;
    background: #22252d;
}

/* Location Header (Clickable) */
.location-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #2a2d35;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.location-header:hover {
    background: #32363f;
}

.location-header .expand-icon {
    font-size: 10px;
    color: #6b7280;
    margin-right: 10px;
    transition: transform 0.2s ease;
    width: 12px;
}

.asset-location-group.expanded .location-header .expand-icon {
    transform: rotate(90deg);
}

.location-header .location-name {
    flex: 1;
    font-weight: 500;
    color: #e8e8e8;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}

.location-header .location-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

.location-header .item-count {
    color: #9ca3af;
    font-size: 12px;
}

.location-header .location-value {
    color: #4caf50;
    font-weight: 600;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}

/* Location Items Container (Hidden by default) */
.location-items {
    display: none;
    padding: 0;
    border-top: 1px solid #3a3d45;
}

.asset-location-group.expanded .location-items {
    display: block;
}

/* Compact Table Styles */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.compact-table thead {
    background: #1a1d23;
}

.compact-table thead th {
    padding: 6px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #9ca3af;
    border-bottom: 1px solid #3a3d45;
}

.compact-table tbody tr {
    border-bottom: 1px solid #2a2d35;
}

.compact-table tbody tr:last-child {
    border-bottom: none;
}

.compact-table tbody tr:hover {
    background: #2a2d35;
}

.compact-table tbody td {
    padding: 5px 10px;
    color: #d1d5db;
    line-height: 1.3;
}

.compact-table .text-right {
    text-align: right;
}

.compact-table tfoot {
    background: #1a1d23;
}

.compact-table tfoot td {
    padding: 6px 10px;
    border-top: 1px solid #3a3d45;
    color: #e8e8e8;
}

.compact-table .total-row td {
    font-size: 11px;
}

/* Responsive adjustments for assets */
@media (max-width: 768px) {
    .assets-summary {
        flex-direction: column;
        gap: 8px;
    }

    .location-header {
        flex-wrap: wrap;
    }

    .location-header .location-name {
        flex-basis: calc(100% - 30px);
        margin-bottom: 5px;
    }

    .location-header .location-stats {
        margin-left: 22px;
    }
}
