/* SC-SRS - Star Citizen Ship Reporting System */
/* Dark theme with cyan/blue accents */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #141824;
    --bg-panel: #1a1f2e;
    --bg-hover: #252a3a;
    
    --accent-primary: #00d9ff;
    --accent-secondary: #0099ff;
    --accent-success: #00ff88;
    --accent-warning: #ffaa00;
    --accent-danger: #ff3366;
    
    --text-primary: #ffffff;
    --text-secondary: #8891a8;
    --text-muted: #4a5568;
    
    --border-color: #2d3748;
    --border-accent: #00d9ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Screen Management */
.screen {
    display: none;
    width: 100vw;
    height: 100vh;
}

.screen.active {
    display: flex;
}

/* Login Screen */
#loginScreen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
}

.login-container {
    background: var(--bg-panel);
    border: 2px solid var(--border-accent);
    border-radius: 8px;
    padding: 40px;
    min-width: 400px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#loginForm input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#loginForm input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

#loginForm button {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

#loginForm button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

.error-message {
    color: var(--accent-danger);
    font-size: 12px;
    text-align: center;
    min-height: 20px;
}

/* Main App Layout */
#mainApp {
    flex-direction: column;
}

.app-header {
    background: var(--bg-panel);
    border-bottom: 2px solid var(--border-accent);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 24px;
    color: var(--accent-primary);
    display: inline-block;
    margin-right: 20px;
}

.system-status {
    color: var(--accent-success);
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
}

.live-clock {
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: bold;
    margin-left: 20px;
    font-family: 'Courier New', monospace;
    padding: 4px 12px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
}

.timezone-label {
    color: var(--accent-warning);
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--accent-warning);
    border-radius: 3px;
    vertical-align: middle;
}

.location-display {
    background: var(--bg-secondary);
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.location-display .label {
    color: var(--text-secondary);
    margin-right: 10px;
}

#locationName {
    color: var(--accent-primary);
    font-weight: bold;
}

.user-info {
    color: var(--text-secondary);
    margin-right: 15px;
}

/* External Links Styling */
.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.external-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.external-link {
    color: #00d4ff;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    font-weight: 500;
    white-space: nowrap;
}

.external-link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

/* Erkul-specific styling */
.erkul-link {
    border-color: rgba(255, 107, 0, 0.25);
    background: rgba(255, 107, 0, 0.08);
}

.erkul-link:hover {
    color: #ff6b00;
    border-color: #ff6b00;
    background: rgba(255, 107, 0, 0.15);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

/* UEX-specific styling */
.uex-link {
    border-color: rgba(0, 255, 157, 0.25);
    background: rgba(0, 255, 157, 0.08);
}

.uex-link:hover {
    color: #00ff9d;
    border-color: #00ff9d;
    background: rgba(0, 255, 157, 0.15);
    box-shadow: 0 2px 8px rgba(0, 255, 157, 0.3);
}

.link-separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.6rem;
    user-select: none;
}

/* Responsive: adjust on smaller screens */
@media (max-width: 768px) {
    .external-link {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

/* Main Content Area */
.main-content {
    display: flex;
    height: calc(100vh - 65px);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

/* Sidebars */
.sidebar-left {
    flex: 1;
    min-width: 350px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.sidebar-left .panel,
.sidebar-left .admin-panel {
    padding: 15px;
}

.sidebar-right {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.content-center {
    flex: 1.5;
    min-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

/* Panels */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.panel h2 {
    color: var(--accent-primary);
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.panel h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Tower Channels */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.channel-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.channel-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.channel-item.active {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.channel-icon {
    font-size: 20px;
}

.channel-name {
    flex: 1;
    font-size: 14px;
}

.channel-status {
    font-size: 12px;
}

/* Audio Controls */
.audio-controls {
    margin-top: 20px;
}

.btn-ptt {
    width: 100%;
    background: var(--accent-success);
    color: var(--bg-primary);
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.btn-ptt:hover {
    background: #00cc77;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.btn-ptt:active {
    background: #00ff88;
    transform: scale(0.98);
}

.btn-ptt small {
    font-size: 10px;
    opacity: 0.7;
}

.volume-control {
    margin-top: 15px;
}

.volume-control label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.volume-control input[type="range"] {
    width: 100%;
}

/* Connection Status */
.connection-status {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-indicator {
    font-size: 14px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 5px;
    background: var(--bg-panel);
    padding: 10px;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.tab-btn {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: bold;
}

/* Tab Content */
/* Tab content visibility - specific to each column */
.content-center-new .tab-content,
.sidebar-right-new .tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.content-center-new .tab-content.active,
.sidebar-right-new .tab-content.active {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

.btn-danger {
    background: var(--accent-danger);
    color: var(--text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 15px;
}

.btn-danger:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

.current-flight-container {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-warning);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.current-flight-container h3 {
    color: var(--accent-warning);
    margin-bottom: 15px;
}

/* Flight List */
.flight-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.flight-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
    padding: 15px;
    transition: all 0.3s;
}

.flight-item:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.flight-pilot {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 20px;
}

.flight-status-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
}

.flight-status-badge.BOARDING {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
    animation: boarding-pulse 1.5s ease-in-out infinite;
}

@keyframes boarding-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.flight-status-badge.departing {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
}

.flight-status-badge.in-transit {
    background: rgba(0, 217, 255, 0.2);
    color: var(--accent-primary);
}

.flight-status-badge.arriving,
.flight-status-badge.ARRIVED {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-success);
}

.flight-status-badge.DEPARTING {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
}

.flight-status-badge.TOOK-OFF,
.flight-status-badge.IN-SPACE {
    background: rgba(0, 217, 255, 0.2);
    color: var(--accent-primary);
}

/* New status badges */
.flight-status-badge.WANNA-JOIN {
    background: rgba(138, 43, 226, 0.2) !important;
    color: #ba55d3 !important;
    animation: wanna-join-pulse 2s ease-in-out infinite !important;
    border: 2px solid #ba55d3;
}

@keyframes wanna-join-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(138, 43, 226, 1);
        transform: scale(1.05);
    }
}

.flight-status-badge.NEED-CREW {
    background: rgba(255, 69, 0, 0.2) !important;
    color: #ff4500 !important;
    animation: need-crew-pulse 1.5s ease-in-out infinite !important;
    border: 2px solid #ff4500;
}

@keyframes need-crew-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 69, 0, 1);
        transform: scale(1.05);
    }
}

.flight-details {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    font-size: 16px;
    color: var(--text-secondary);
}

.flight-details strong {
    font-size: 20px;
}

.flight-details small {
    font-size: 16px;
}

.flight-arrow {
    color: var(--accent-primary);
    font-size: 28px;
    font-weight: bold;
}

/* Participants */
.participant-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-name {
    font-size: 13px;
}

.participant-status {
    font-size: 16px;
}

/* Stats */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 14px;
}

/* Location Info */
.location-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-item .label {
    color: var(--text-secondary);
    font-size: 13px;
}

.info-item span:last-child {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Market Data */
.market-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.market-search input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 4px;
}

.market-data {
    margin-top: 20px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar-right {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar-left,
    .sidebar-right {
        width: 100%;
    }
}
/* SC-SRS NEW LAYOUT - 3 Column Reorganization */
/* Overrides and additions to styles.css for new layout */

/* Main Content - 3 Column Grid */
.main-content-new {
    display: grid;
    grid-template-columns: 300px 1fr 380px;
    gap: 15px;
    height: calc(100vh - 90px);
    padding: 15px;
    overflow: hidden;
}

/* Center Column - Public Boards (Read-Only) */
.content-center-new {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border-radius: 8px;
    overflow: hidden;
}

.content-center-new .tab-navigation {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.content-center-new .tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Right Sidebar - My Actions (Forms) */
.sidebar-right-new {
    background: var(--bg-panel);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-navigation-small {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.tab-btn-small {
    flex: 1;
    background: var(--bg-panel);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tab-btn-small.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.tab-btn-small:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.sidebar-right-new .tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.sidebar-right-new .panel {
    margin-bottom: 0;
}

.sidebar-right-new h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.sidebar-right-new h4 {
    font-size: 0.95rem;
    margin: 15px 0 10px 0;
    color: var(--text-secondary);
}

/* Compact Form Styles */
.sidebar-right-new .form-group {
    margin-bottom: 12px;
}

.sidebar-right-new .form-group label {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.sidebar-right-new input,
.sidebar-right-new select {
    font-size: 0.9rem;
    padding: 8px 10px;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Compact Flight Info */
.flight-item-compact {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.flight-item-compact .ship-name {
    color: var(--accent-primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.flight-item-compact .route {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Compact Location Info */
.location-info-compact {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.location-info-compact h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
}

.location-info-compact .info-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.location-info-compact .info-item:last-child {
    border-bottom: none;
}

.location-info-compact .label {
    color: var(--text-secondary);
}

/* Compact Stats */
.stats-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.stats-grid-compact .stat-item {
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stats-grid-compact .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stats-grid-compact .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Panel Section */
.panel-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.panel-section h4 {
    margin-top: 0;
}

/* Compact Participant List */
.participant-list-compact {
    max-height: 200px;
    overflow-y: auto;
}

.participant-list-compact .participant-item {
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-list-compact .participant-item .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-success);
}

/* Board Info */
.board-info {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
}

.board-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Flight List in Center */
.flight-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flight-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s;
}

.flight-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.2);
}

.flight-item .ship-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.flight-item .pilot-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.flight-item .route {
    font-size: 0.95rem;
    margin: 5px 0;
    color: var(--text-primary);
}

.flight-item .route-arrow {
    color: var(--accent-primary);
    margin: 0 8px;
}

.flight-item .flight-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.flight-item .flight-meta span {
    color: var(--text-secondary);
}

.flight-item .flight-meta .status {
    color: var(--accent-success);
    font-weight: bold;
}

/* New Flight Board Styles */
.flight-ship {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.flight-cargo {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.flight-price-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flight-price-badge.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.flight-price-badge.clickable:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.flight-crew-hire-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flight-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.station-from,
.station-to {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.station-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: bold;
    letter-spacing: 1px;
}

.station-name {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.station-from .station-name {
    color: #ffaa00; /* Gold for FROM */
}

.station-to .station-name {
    color: #00ff88; /* Green for TO */
}

.flight-arrow-big {
    font-size: 2rem;
    color: var(--accent-primary);
    line-height: 1;
}

/* Locations List */
.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.location-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
}

.location-card .system-name {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: bold;
    margin-bottom: 8px;
}

.location-card .location-name {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.location-card .pilot-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.pilots-list {
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.pilot-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.9rem;
}

.pilot-icon {
    font-size: 1.1rem;
}

.pilot-name {
    flex: 1;
    color: var(--text-primary);
}

.pilot-role {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: bold;
}

.pilot-role.marines { color: #ff3366; }
.pilot-role.trade { color: #ffaa00; }
.pilot-role.fleet { color: #0099ff; }
.pilot-role.mining { color: #ff6600; }
.pilot-role.transport { color: #00cc66; }
.pilot-role.medic { color: #66ccff; }
.pilot-role.wanna-join { color: #ba55d3; }
.pilot-role.need-crew { color: #ff4500; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive Breakpoints */
@media (max-width: 1400px) {
    .main-content-new {
        grid-template-columns: 240px 1fr 340px;
    }
}

@media (max-width: 1200px) {
    .main-content-new {
        grid-template-columns: 220px 1fr 320px;
        gap: 10px;
        padding: 10px;
    }

    .sidebar-right-new .panel {
        padding: 12px;
    }
}

@media (max-width: 992px) {
    .main-content-new {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        height: auto;
        min-height: calc(100vh - 90px);
    }

    .sidebar-left {
        height: auto;
        max-height: 300px;
    }

    .sidebar-right-new {
        height: auto;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .locations-list {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.content-center-new .tab-content::-webkit-scrollbar,
.sidebar-right-new .tab-content::-webkit-scrollbar {
    width: 8px;
}

.content-center-new .tab-content::-webkit-scrollbar-track,
.sidebar-right-new .tab-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.content-center-new .tab-content::-webkit-scrollbar-thumb,
.sidebar-right-new .tab-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.content-center-new .tab-content::-webkit-scrollbar-thumb:hover,
.sidebar-right-new .tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flight-item,
.location-card {
    animation: slideInRight 0.3s ease-out;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 217, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Chat Styles */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-panel);
    border-radius: 4px;
    border-left: 3px solid var(--accent-primary);
}

.chat-message.local-message {
    border-left-color: var(--accent-warning);
    opacity: 0.8;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-author {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.message-author.own-message {
    color: var(--accent-warning);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-local-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 6px;
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-warning);
    font-size: 0.7rem;
    border-radius: 3px;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input-container input {
    flex: 1;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.chat-input-container button {
    min-width: 80px;
}

/* Role Selector Styles */
.status-info-compact {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.current-role-display {
    text-align: center;
    margin-top: 10px;
}

.role-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.role-btn {
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: bold;
}

.role-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
}

.role-btn.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Marines - Red */
.role-btn[data-role="MARINES"]:hover,
.role-btn[data-role="MARINES"].active {
    border-color: #ff3366;
    background: #ff3366;
}

/* Trade - Gold */
.role-btn[data-role="TRADE"]:hover,
.role-btn[data-role="TRADE"].active {
    border-color: #ffaa00;
    background: #ffaa00;
}

/* Fleet - Blue */
.role-btn[data-role="FLEET"]:hover,
.role-btn[data-role="FLEET"].active {
    border-color: #0099ff;
    background: #0099ff;
}

/* Mining - Orange */
.role-btn[data-role="MINING"]:hover,
.role-btn[data-role="MINING"].active {
    border-color: #ff6600;
    background: #ff6600;
}

/* Transport - Green */
.role-btn[data-role="TRANSPORT"]:hover,
.role-btn[data-role="TRANSPORT"].active {
    border-color: #00cc66;
    background: #00cc66;
}

/* Medic - White/Light Blue */
.role-btn[data-role="MEDIC"]:hover,
.role-btn[data-role="MEDIC"].active {
    border-color: #66ccff;
    background: #66ccff;
    color: #0a0e14;
}

/* Wanna Join - Purple with pulse */
.role-btn[data-role="WANNA-JOIN"]:hover,
.role-btn[data-role="WANNA-JOIN"].active {
    border-color: #ba55d3;
    background: #ba55d3;
    animation: wanna-join-pulse 2s ease-in-out infinite;
}

/* Need Crew - Orange-Red with pulse */
.role-btn[data-role="NEED-CREW"]:hover,
.role-btn[data-role="NEED-CREW"].active {
    border-color: #ff4500;
    background: #ff4500;
    animation: need-crew-pulse 1.5s ease-in-out infinite;
}

.location-compact-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.info-item-small {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.85rem;
}

.info-item-small .label {
    color: var(--text-secondary);
}

/* SC-HANDLE Lookup Styles */
.handle-search-form {
    margin-bottom: 20px;
}

.handle-results {
    margin-top: 20px;
}

.handle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.handle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-accent);
}

.handle-header h4 {
    color: var(--accent-primary);
    font-size: 24px;
    margin: 0;
}

.handle-badge {
    background: var(--accent-success);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.handle-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.handle-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.handle-label {
    color: var(--text-secondary);
    font-weight: bold;
}

.handle-info-item span:last-child {
    color: var(--text-primary);
}

.handle-bio {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.handle-bio h5 {
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-size: 14px;
}

.handle-bio p {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: var(--accent-primary);
    font-style: italic;
}

.error-message {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

/* Flight Timer */
.flight-timer {
    background: var(--accent-warning);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    margin-left: 10px;
    font-family: 'Courier New', monospace;
}

/* Admin Panel */
.admin-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid var(--accent-warning);
    border-radius: 8px;
}

.admin-panel h3 {
    color: var(--accent-warning);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

/* Organization Panel */
.organization-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 217, 255, 0.05);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
}

.organization-panel h3 {
    color: var(--accent-primary);
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}

.btn-admin {
    width: 100%;
    padding: 12px;
    background: var(--accent-warning);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-admin:hover {
    background: #ffbb33;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 170, 0, 0.3);
}

.btn-admin.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn-admin.btn-danger:hover {
    background: #ff6666;
    box-shadow: 0 4px 8px rgba(255, 68, 68, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-panel);
    border: 2px solid var(--border-accent);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-accent);
}

.modal-header h2 {
    color: var(--accent-primary);
    font-size: 24px;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-close:hover {
    color: var(--accent-danger);
    transform: rotate(90deg);
}

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

.pending-users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pending-user-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pending-user-info h4 {
    color: var(--accent-primary);
    margin: 0 0 8px 0;
    font-size: 18px;
}

.pending-user-info p {
    color: var(--text-secondary);
    margin: 4px 0;
    font-size: 14px;
}

.pending-user-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-approve {
    background: var(--accent-success);
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-approve:hover {
    background: #00ff99;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 136, 0.3);
}

.btn-reject {
    background: var(--accent-danger);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reject:hover {
    background: #ff4477;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 51, 102, 0.3);
}

/* Flight Status Change Buttons */
.btn-status-change {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: bold;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-status-change:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

.btn-status-change:active {
    transform: translateY(0);
}

.btn-status-change.active {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: var(--bg-primary);
}

/* ========================================================================
   ORGANIZATION STYLES
   ======================================================================== */

.org-status-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.org-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.org-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.org-info-item .label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.org-info-item .value {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-primary);
}

.org-key-display {
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 4px;
    border-left: 3px solid var(--accent-primary);
}

.org-key-display .label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

.org-key-display code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-secondary);
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
}

/* Member cards */
.member-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-info strong {
    color: var(--text-primary);
    margin-right: 10px;
}

.member-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.member-status.standard {
    background: var(--accent-secondary);
    color: var(--bg-primary);
}

.member-status.command {
    background: var(--status-warning);
    color: var(--bg-primary);
}

.member-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small.btn-success {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-small.btn-success:hover {
    background: #00dd88;
}

.btn-small.btn-warning {
    background: var(--status-warning);
    color: var(--bg-primary);
}

.btn-small.btn-warning:hover {
    background: #ffbb33;
}

.btn-small.btn-danger {
    background: var(--accent-danger);
    color: var(--text-primary);
}

.btn-small.btn-danger:hover {
    background: #ff4477;
}

/* Organization management cards */
.org-manage-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.org-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.org-manage-header h4 {
    color: var(--accent-primary);
    margin: 0;
}

.org-member-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 3px;
}

.org-manage-keys {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.org-manage-keys code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-secondary);
    background: var(--bg-primary);
    padding: 6px 10px;
    border-radius: 3px;
}

.org-manage-actions {
    display: flex;
    gap: 10px;
}

.members-list {
    max-height: 400px;
    overflow-y: auto;
}

.orgs-manage-list {
    max-height: 500px;
    overflow-y: auto;
}

.success-message {
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

/* ========================================
   ROLE MANAGEMENT STYLES (v3.2)
   ======================================== */

/* Role Management Modal */
.role-filter-bar {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.role-filter-bar label {
    color: var(--text-primary);
    font-weight: 600;
}

.role-filter-bar select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

/* Roles Users List */
.roles-users-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Roles Table */
.roles-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.roles-table thead {
    background: rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.roles-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

.roles-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.roles-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-superadmin {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.role-admin {
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
}

.role-idris_commander {
    background: linear-gradient(135deg, #2196F3 0%, #0D47A1 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

.role-commander {
    background: linear-gradient(135deg, #FF5722 0%, #D32F2F 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.role-pilot {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.role-crew {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    color: #fff;
}

.role-crew2 {
    background: linear-gradient(135deg, #9E9E9E 0%, #616161 100%);
    color: #fff;
}

/* Badge for "you" */
.badge-you {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 5px;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.role-selector {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.role-selector:hover {
    border-color: var(--accent-primary);
}

/* Action Buttons */
.btn-change-role {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change-role:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

.btn-degrade {
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-degrade:hover {
    background: linear-gradient(135deg, #c92a2a 0%, #a61e1e 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.text-muted {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: 12px;
}

/* Empty State & Loading */
.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.loading-spinner {
    padding: 40px;
    text-align: center;
    color: var(--accent-primary);
    font-weight: 600;
}

.error-message {
    padding: 20px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .roles-table {
        font-size: 12px;
    }
    
    .roles-table th,
    .roles-table td {
        padding: 8px 6px;
    }
    
    .actions-cell {
        flex-direction: column;
        align-items: stretch;
    }
    
    .role-selector,
    .btn-change-role,
    .btn-degrade {
        width: 100%;
        margin-bottom: 4px;
    }
}
/* ===================================
   UNIVERSE TOWER - IMPROVED STYLES
   =================================== */

/* Locations Grid */
.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 10px 0;
}

/* ═══════════════════════════════════════════════════════════════
   UNIVERSE TOWER - REDESIGNED v3.6
   Piękny, nowoczesny wygląd dla public board
   ═══════════════════════════════════════════════════════════════ */

/* Location Card - Główna karta systemu */
.location-card {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.95), rgba(30, 35, 50, 0.95));
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(100, 150, 255, 0.05);
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease-out;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4), 0 0 60px rgba(100, 150, 255, 0.1);
    border-color: rgba(100, 150, 255, 0.4);
}

/* Location Header - Nagłówek z systemem i liczbą pilotów */
.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.1), rgba(50, 100, 200, 0.05));
    border-bottom: 1px solid rgba(100, 150, 255, 0.15);
}

.system-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px currentColor);
    animation: gentleGlow 3s ease-in-out infinite;
}

@keyframes gentleGlow {
    0%, 100% { filter: drop-shadow(0 0 8px currentColor); }
    50% { filter: drop-shadow(0 0 12px currentColor); }
}

.system-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(100, 150, 255, 0.5);
}

.pilot-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(100, 150, 255, 0.15);
    border-radius: 20px;
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.pilot-count-number {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.pilot-count-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Location Name - Pełna nazwa lokalizacji */
.location-name {
    font-size: 1rem;
    color: var(--text-primary);
    padding: 12px 20px;
    font-weight: 500;
    border-bottom: 1px solid rgba(100, 150, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* Pilots List - Lista pilotów */
.pilots-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Pilot Item - Pojedynczy pilot (główny kontener) */
.pilot-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(40, 50, 70, 0.5), rgba(30, 40, 60, 0.5));
    border: 1px solid rgba(100, 150, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pilot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pilot-item:hover {
    background: linear-gradient(135deg, rgba(50, 60, 80, 0.7), rgba(40, 50, 70, 0.7));
    border-color: rgba(100, 150, 255, 0.3);
    transform: translateX(4px);
}

.pilot-item:hover::before {
    opacity: 1;
}

/* Pilot Main - Linia 1: Ikona + Nazwa + Role Badge */
.pilot-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pilot-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 6px currentColor);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.pilot-item:hover .pilot-icon {
    transform: scale(1.1);
}

.pilot-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.user-role-badge {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px currentColor);
    cursor: help;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.pilot-item:hover .user-role-badge {
    transform: scale(1.15) rotate(5deg);
}

/* Pilot Details - Linia 2: Status Badge + Command Key */
.pilot-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 42px; /* Align with name (icon + gap) */
    flex-wrap: wrap;
}

.game-status-badge {
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Status Colors - Piękne kolory dla każdego statusu */
.game-status-badge.marines {
    color: #ff3366;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(255, 51, 102, 0.05));
    border-color: rgba(255, 51, 102, 0.4);
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.2), 0 0 20px rgba(255, 51, 102, 0.1);
}

.game-status-badge.trade {
    color: #ffaa00;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2), rgba(255, 170, 0, 0.05));
    border-color: rgba(255, 170, 0, 0.4);
    box-shadow: 0 2px 8px rgba(255, 170, 0, 0.2), 0 0 20px rgba(255, 170, 0, 0.1);
}

.game-status-badge.fleet {
    color: #0099ff;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.2), rgba(0, 153, 255, 0.05));
    border-color: rgba(0, 153, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 153, 255, 0.2), 0 0 20px rgba(0, 153, 255, 0.1);
}

.game-status-badge.mining,
.game-status-badge.miner {
    color: #ff6600;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.2), rgba(255, 102, 0, 0.05));
    border-color: rgba(255, 102, 0, 0.4);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2), 0 0 20px rgba(255, 102, 0, 0.1);
}

.game-status-badge.transport {
    color: #00cc66;
    background: linear-gradient(135deg, rgba(0, 204, 102, 0.2), rgba(0, 204, 102, 0.05));
    border-color: rgba(0, 204, 102, 0.4);
    box-shadow: 0 2px 8px rgba(0, 204, 102, 0.2), 0 0 20px rgba(0, 204, 102, 0.1);
}

.game-status-badge.medic {
    color: #66ccff;
    background: linear-gradient(135deg, rgba(102, 204, 255, 0.2), rgba(102, 204, 255, 0.05));
    border-color: rgba(102, 204, 255, 0.4);
    box-shadow: 0 2px 8px rgba(102, 204, 255, 0.2), 0 0 20px rgba(102, 204, 255, 0.1);
}

.game-status-badge.wannajoin {
    color: #ba55d3;
    background: linear-gradient(135deg, rgba(186, 85, 211, 0.2), rgba(186, 85, 211, 0.05));
    border-color: rgba(186, 85, 211, 0.4);
    box-shadow: 0 2px 8px rgba(186, 85, 211, 0.2), 0 0 20px rgba(186, 85, 211, 0.1);
}

.game-status-badge.needcrew {
    color: #ff4500;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.3), rgba(255, 69, 0, 0.1));
    border-color: rgba(255, 69, 0, 0.5);
    animation: pulse-glow-enhanced 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3), 0 0 20px rgba(255, 69, 0, 0.2);
}

@keyframes pulse-glow-enhanced {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3), 0 0 20px rgba(255, 69, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 69, 0, 0.5), 0 0 30px rgba(255, 69, 0, 0.4);
        transform: scale(1.05);
    }
}

.game-status-badge.bountyhunting {
    color: #dc143c;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2), rgba(220, 20, 60, 0.05));
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2), 0 0 20px rgba(220, 20, 60, 0.1);
}

.game-status-badge.exploration {
    color: #4169e1;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.2), rgba(65, 105, 225, 0.05));
    border-color: rgba(65, 105, 225, 0.4);
    box-shadow: 0 2px 8px rgba(65, 105, 225, 0.2), 0 0 20px rgba(65, 105, 225, 0.1);
}

.game-status-badge.salvage {
    color: #999999;
    background: linear-gradient(135deg, rgba(153, 153, 153, 0.2), rgba(153, 153, 153, 0.05));
    border-color: rgba(153, 153, 153, 0.4);
    box-shadow: 0 2px 8px rgba(153, 153, 153, 0.2), 0 0 20px rgba(153, 153, 153, 0.1);
}

.game-status-badge.fighter_pilot,
.game-status-badge.fighterpilot {
    color: #ff9933;
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.2), rgba(255, 153, 51, 0.05));
    border-color: rgba(255, 153, 51, 0.4);
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.2), 0 0 20px rgba(255, 153, 51, 0.1);
}

.command-key-badge {
    font-size: 1rem;
    filter: drop-shadow(0 0 6px gold);
    cursor: help;
    animation: keyRotate 4s ease-in-out infinite;
}

@keyframes keyRotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Pilot Location - Linia 3: Dokładna lokalizacja */
.pilot-location {
    font-size: 0.8rem;
    color: rgba(150, 180, 220, 0.8);
    margin-left: 42px; /* Align with details */
    padding: 4px 0;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pilot-location::before {
    content: '•';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-primary);
    animation: locationPulse 2s ease-in-out infinite;
}

@keyframes locationPulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 4px var(--accent-primary); }
    50% { opacity: 1; box-shadow: 0 0 8px var(--accent-primary); }
}

/* Empty State - Gdy brak pilotów */
.no-locations-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.no-locations-message::before {
    content: '🌌';
    display: block;
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .location-card {
        border-radius: 8px;
    }

    .location-header {
        padding: 12px 16px;
    }

    .system-name {
        font-size: 1rem;
    }

    .pilot-item {
        padding: 12px;
    }

    .pilot-details,
    .pilot-location {
        margin-left: 0;
        padding-left: 38px; /* Icon width + gap */
    }

    .pilot-icon {
        font-size: 1.2rem;
    }

    .pilot-name {
        font-size: 0.95rem;
    }
}

/* Dark Mode Enhancement */
@media (prefers-color-scheme: dark) {
    .location-card {
        background: linear-gradient(135deg, rgba(15, 20, 30, 0.98), rgba(25, 30, 45, 0.98));
    }
}
/* Registration Form Styles - Add to styles.css */

/* Form toggle button */
.toggle-btn {
    background: none;
    border: none;
    color: #6a9bd8;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9em;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.toggle-btn:hover {
    color: #8abbff;
}

/* Registration form */
#registerForm {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#registerForm h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.3em;
    text-shadow: 0 2px 8px rgba(100, 150, 255, 0.3);
}

/* Captcha box */
.captcha-box {
    background: rgba(40, 50, 70, 0.5);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.captcha-box p {
    margin: 0;
}

.captcha-box p:first-child {
    color: #bbb;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-align: center;
}

#captchaQuestion {
    color: #fff;
    font-size: 1.1em;
    text-align: center;
    font-weight: 500;
    margin-bottom: 10px;
}

#captchaAnswer {
    text-align: center;
    font-size: 1.1em;
}

/* Success message */
.success-message {
    display: none;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #4ade80;
    text-align: center;
    line-height: 1.6;
}

.success-message strong {
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

.success-message p {
    margin: 10px 0 5px 0;
    font-size: 0.9em;
}

/* Form toggle container */
.form-toggle {
    text-align: center;
    margin-top: 15px;
}

/* Input validation states */
#registerForm input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
}

#registerForm input:valid:not(:placeholder-shown) {
    border-color: #4ade80;
}

/* Password strength indicator (future enhancement) */
.password-strength {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-weak {
    width: 33%;
    background-color: #ff6b6b;
}

.password-strength-medium {
    width: 66%;
    background-color: #ffd93d;
}

.password-strength-strong {
    width: 100%;
    background-color: #4ade80;
}

/* Fix empty error message boxes on login */
#loginError:empty,
#registerError:empty {
    display: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Show error message only when it has content */
#loginError:not(:empty),
#registerError:not(:empty) {
    display: block;
    margin-top: 10px;
}


/* Flight Action Buttons */
.flight-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.btn-flight-chat,
.btn-flight-voice {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 5px;
    color: #00ff88;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-flight-chat:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 136, 0.3);
}

.btn-flight-voice {
    background: rgba(106, 155, 216, 0.1);
    border-color: rgba(106, 155, 216, 0.3);
    color: #6a9bd8;
}

.btn-flight-voice:hover {
    background: rgba(106, 155, 216, 0.2);
    border-color: #6a9bd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 155, 216, 0.3);
}

