:root {
    --color-primary: #00ccff;
    --color-success: #00ff99;
    --color-warning: #ffcc00;
    --color-danger: #ff4757;
    --color-text: #ffffff;
    --color-bg: #0a0a2a;
    --color-bg-light: rgba(255, 255, 255, 0.05);
    --color-border: rgba(255, 255, 255, 0.1);
    --corp-bg-image: none; 
}

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

body {
    font-family: 'Arial', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* Header Styles */
.header {
    display: flex; 
    align-items: center; 
    gap: 20px;
    margin-bottom: 30px; 
    padding: 20px;
    background: var(--color-bg-light); 
    border-radius: 15px;
    backdrop-filter: blur(10px); 
    border: 1px solid var(--color-border);
}

.character-portrait {
    width: 80px; 
    height: 80px; 
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
}

.character-info h1 { 
    color: var(--color-primary); 
    margin-bottom: 5px; 
}

.character-info p { 
    color: #cccccc; 
}

.corp-alliance-logos {
    display: flex; 
    align-items: flex-end;
    margin-left: 20px;
}

.corp-logo {
    width: 120px; 
    height: 120px; 
    border-radius: 10px;
    z-index: 2;
}

.alliance-logo {
    width: 120px; 
    height: 120px; 
    border-radius: 8px;
    margin-left: -50px;
    z-index: 1;
}

.header-actions { 
    display: flex; 
    gap: 10px; 
    margin-left: auto; 
}

.btn { 
    padding: 10px 20px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: transform 0.2s; 
}

.btn-primary { 
    background: linear-gradient(45deg, var(--color-primary), #0077ff); 
}

.btn-warning { 
    background: linear-gradient(45deg, var(--color-warning), #ff9500); 
}

.btn-danger { 
    background: linear-gradient(45deg, var(--color-danger), #ff3838); 
}

.btn:hover { 
    transform: translateY(-2px); 
}

/* Sync Info */
.sync-info {
    background: rgba(0,255,0,0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--color-success);
}

.sync-error {
    background: rgba(255,0,0,0.1);
    border-left: 4px solid var(--color-danger);
}

/* Active Stats Bar */
.active-stats-bar {
    background: var(--color-bg-light); 
    padding: 20px; 
    border-radius: 12px;
    margin: 20px 0; 
    border-left: 4px solid var(--color-success);
}

.stats-row {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
    margin-bottom: 15px;
}

.stats-item {
    background: rgba(0, 0, 0, 0.2); 
    padding: 15px; 
    border-radius: 8px;
}

.stats-header {
    display: flex; 
    align-items: center; 
    gap: 10px;
    margin-bottom: 10px; 
    color: var(--color-primary);
}

.stats-values {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
}

.stats-value {
    text-align: center; 
    padding: 8px; 
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.value-number { 
    font-weight: bold; 
    font-size: 1.1em; 
}

.value-label { 
    font-size: 0.8em; 
    color: #cccccc; 
}

/* Filters */
.filters {
    background: var(--color-bg-light); 
    padding: 20px; 
    border-radius: 15px;
    margin: 20px 0; 
    border: 1px solid var(--color-border);
}

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

.filter-group { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.filter-label { 
    color: var(--color-primary); 
    font-weight: bold; 
}

.filter-select {
    padding: 10px; 
    border: 1px solid var(--color-border); 
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3); 
    color: var(--color-text);
}

.btn-apply { 
    padding: 12px 25px; 
    background: var(--color-primary); 
    color: white;
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-apply:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, var(--color-primary), #0088ff);
}

/* Contracts Grid */
.contracts-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px; 
    margin: 30px 0;
}

.contract-card {
    background: var(--color-bg-light); 
    padding: 20px; 
    border-radius: 12px;
    border: 1px solid var(--color-border); 
    transition: all 0.3s ease;
}

.contract-card:hover {
    transform: translateY(-3px); 
    border-color: var(--color-primary);
    box-shadow: 0 5px 20px rgba(0, 204, 255, 0.2);
}

.contract-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: start;
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid var(--color-border);
}

.contract-type { 
    font-size: 1.1em; 
    font-weight: bold; 
    color: var(--color-primary); 
}

.contract-status { 
    padding: 4px 12px; 
    border-radius: 15px; 
    font-size: 0.8em; 
    font-weight: bold; 
}

.status-active { 
    background: var(--color-success); 
    color: #000; 
}

.status-progress { 
    background: var(--color-warning); 
    color: #000; 
}

.status-completed { 
    background: #00bfff; 
    color: #000; 
}

.status-cancelled { 
    background: var(--color-danger); 
    color: #fff; 
}

.status-deleted { 
    background: #666; 
    color: #fff; 
}

/* Issuer Info */
.issuer-logos {
    display: flex;
    align-items: flex-end;
}

.issuer-corp-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    z-index: 2;
}

.issuer-alliance-logo {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-left: -15px;
    margin-bottom: 0px;
    z-index: 1;
}

.issuer-info {
    display: flex; 
    align-items: center; 
    gap: 10px;
    margin-bottom: 15px; 
    padding: 10px;
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 8px;
}

.issuer-portrait {
    width: 40px; 
    height: 40px; 
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.issuer-details {
    flex: 1;
}

.issuer-name {
    font-weight: bold; 
    color: var(--color-primary);
    margin-bottom: 2px;
}

.issuer-type {
    font-size: 0.8em; 
    color: #cccccc;
}

/* Contract Details */
.contract-details { 
    display: grid; 
    gap: 10px; 
    margin-bottom: 15px; 
}

.contract-detail { 
    display: flex; 
    justify-content: space-between; 
}

.detail-label { 
    color: #cccccc; 
}

.detail-value { 
    font-weight: bold; 
}

.detail-value.isk { 
    color: var(--color-success); 
}

.detail-value.volume { 
    color: var(--color-warning); 
}

/* Station Info */
.station-info { 
    background: rgba(0, 0, 0, 0.2); 
    padding: 12px; 
    border-radius: 8px;
    margin-top: 10px; 
    border-left: 3px solid var(--color-primary);
}

.station-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin: 6px 0; 
    padding: 4px 0;
}

.station-name {
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    max-width: 200px; 
    font-weight: bold; 
    color: var(--color-warning);
}

.station-type {
    font-size: 0.8em; 
    color: #888; 
    margin-left: 8px; 
    white-space: nowrap;
}

/* Contract Footer */
.contract-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding-top: 15px; 
    border-top: 1px solid var(--color-border); 
}

.contract-date { 
    color: #cccccc; 
    font-size: 0.9em; 
}

.contract-id { 
    color: #666; 
    font-size: 0.8em; 
}

/* Loading and Error States */
.loading, .error, .empty-state {
    text-align: center; 
    padding: 40px; 
    grid-column: 1 / -1;
}

.error { 
    color: var(--color-danger); 
}

.empty-state { 
    color: #cccccc; 
}

/* Responsive */
@media (max-width: 768px) {
    .header { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .corp-alliance-logos { 
        margin: 15px 0; 
        justify-content: center; 
    }
    
    .header-actions { 
        margin: 15px 0 0 0; 
        justify-content: center; 
    }
    
    .filters-grid { 
        grid-template-columns: 1fr; 
    }
    
    .contracts-grid { 
        grid-template-columns: 1fr; 
    }
    
    .stats-row { 
        grid-template-columns: 1fr; 
    }
    
    .stats-values { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .station-name { 
        max-width: 120px; 
    }
    
    .corp-logo { 
        width: 80px; 
        height: 80px; 
    }
    
    .alliance-logo { 
        width: 60px; 
        height: 60px; 
        margin-left: -20px; 
    }
    
    .issuer-info {
        flex-direction: column;
        text-align: center;
    }
    
    .issuer-logos {
        justify-content: center;
        margin-top: 10px;
    }
}

/* Debug Info */
.debug-info {
    position: fixed; 
    bottom: 10px; 
    right: 10px; 
    background: rgba(0,0,0,0.7); 
    color: #ccc; 
    padding: 8px 12px; 
    border-radius: 5px; 
    font-size: 11px;
    z-index: 1000; 
    backdrop-filter: blur(5px);
}

/* Additional styles for inline elements */
.active-stats-bar h4 {
    color: var(--color-warning); 
    margin: 20px 0 15px 0;
}

/* Styles for inline grid elements */
.active-stats-bar .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.active-stats-bar .stat-item {
    text-align: center; 
    padding: 10px; 
    background: rgba(0,0,0,0.3); 
    border-radius: 6px;
}

.active-stats-bar .stat-value {
    font-weight: bold; 
    font-size: 1.1em;
}

.active-stats-bar .stat-label {
    font-size: 0.8em; 
    color: #cccccc;
}
/* Добавьте в css/dashboard.css */
.contract-card {
    position: relative;
    overflow: hidden;
}

.corp-contract-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

.corp-background-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.contract-header,
.issuer-info,
.contract-details,
.contract-footer {
    position: relative;
    z-index: 1;
}
.contract-card.corp-contract {
    position: relative;
    border: 2px solid #4a4a8a;
    background-size: 40% 40% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0.9;
}

.contract-card.corp-contract::after {
    content: '🏢 Корпоративный';
    position: absolute;
    top: 60px;
    left: 20px;
    background: rgba(74, 74, 138, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}
/* Подфильтры и статистика */
.subfilters-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.subfilters h4,
.filtered-stats h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
}

.station-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 10px;
    align-items: end;
}

.station-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.station-filter-group label {
    font-size: 12px;
    color: #cccccc;
    font-weight: 500;
}

.station-select {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 12px;
    min-width: 120px;
}

.btn-apply-small,
.btn-clear {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-apply-small {
    background: var(--color-primary);
    color: white;
}

.btn-clear {
    background: #666;
    color: white;
}

.btn-apply-small:hover {
    background: var(--color-primary-dark);
}

.btn-clear:hover {
    background: #777;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
    color: var(--color-success);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .subfilters-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .station-filters {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Красивый копирайт */
.footer-copyright {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.copyright-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    border: 1px solid rgba(74, 74, 138, 0.3);
    backdrop-filter: blur(10px);
}

.copyright-text {
    font-size: 12px;
    color: #888;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.wigoh-logo {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.wigoh-logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -5px;
    right: -5px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-success));
    border-radius: 4px;
    z-index: -1;
    opacity: 0.1;
}

.copyright-symbol {
    font-size: 10px;
    color: var(--color-success);
    vertical-align: super;
    margin-left: -4px;
}

.copyright-year {
    font-size: 12px;
    color: #666;
    font-weight: 300;
}

/* Анимация при наведении */
.copyright-content:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 74, 138, 0.2);
    border-color: rgba(74, 74, 138, 0.5);
    transition: all 0.3s ease;
}

.copyright-content:hover .wigoh-logo {
    background: linear-gradient(45deg, var(--color-success), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .footer-copyright {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .copyright-content {
        padding: 10px 20px;
        flex-direction: column;
        gap: 4px;
    }
    
    .copyright-text {
        font-size: 11px;
    }
    
    .wigoh-logo {
        font-size: 14px;
    }
    
    .copyright-year {
        font-size: 11px;
    }
}

/* Эффект свечения */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(74, 74, 138, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(74, 74, 138, 0.5);
    }
    100% {
        box-shadow: 0 0 5px rgba(74, 74, 138, 0.3);
    }
}

.copyright-content {
    animation: glow 3s ease-in-out infinite;
}
/* EVE-style buttons */
.eve-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.eve-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.eve-btn:hover::before {
    left: 100%;
}

.eve-btn-primary {
    background: linear-gradient(135deg, #00aaff, #0077cc);
    border-color: #00ccff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 204, 255, 0.3);
}

.eve-btn-primary:hover {
    background: linear-gradient(135deg, #00bbff, #0088dd);
    border-color: #00ddff;
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.4);
    transform: translateY(-1px);
}

.eve-btn-secondary {
    background: linear-gradient(135deg, #444444, #222222);
    border-color: #666666;
    color: #cccccc;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.2);
}

.eve-btn-secondary:hover {
    background: linear-gradient(135deg, #555555, #333333);
    border-color: #777777;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
    transform: translateY(-1px);
}

.eve-btn-danger {
    background: linear-gradient(135deg, #ff4757, #cc3342);
    border-color: #ff6b7b;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 123, 0.3);
}

.eve-btn-danger:hover {
    background: linear-gradient(135deg, #ff5c6c, #dd3a4a);
    border-color: #ff7f8f;
    box-shadow: 0 4px 12px rgba(255, 107, 123, 0.4);
    transform: translateY(-1px);
}

.eve-btn-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Responsive buttons */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .eve-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .eve-btn-icon {
        font-size: 1em;
    }
}
/* Color variations for different stat types */
.active-stats-bar .stat-value.warning { color: var(--color-warning); }
.active-stats-bar .stat-value.success { color: var(--color-success); }
.active-stats-bar .stat-value.danger { color: var(--color-danger); }
.active-stats-bar .stat-value.primary { color: var(--color-primary); }

/* Добавляем контейнер для header-actions */
.header-actions-container {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

/* Ограничиваем максимальную ширину и разрешаем перенос */
.header-actions { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; /* Разрешаем перенос на новую строку */
    justify-content: flex-end; /* Выравнивание по правому краю */
    max-width: 600px; /* Ограничиваем максимальную ширину */
}

/* Адаптивные стили для разных размеров экрана */
@media (max-width: 1200px) {
    .header-actions {
        max-width: 500px;
    }
}

@media (max-width: 1024px) {
    .header-actions {
        max-width: 450px;
    }
}

@media (max-width: 900px) {
    .header-actions {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .header-actions-container {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }
    
    .header-actions {
        max-width: 100%;
        justify-content: center;
        margin: 15px 0 0 0;
    }
    
    .header { 
        flex-direction: column; 
        text-align: center; 
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .eve-btn {
        width: 250px;
        justify-content: center;
    }
}

/* Для очень широких экранов - ограничиваем рост */
@media (min-width: 1600px) {
    .header-actions {
        max-width: 700px;
    }
}

