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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0e27;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    padding: 20px;
    border-bottom: 2px solid #2a3f5f;
    border-right: 2px solid #2a3f5f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 400px;
    flex-shrink: 0;
}

.header-left {
    flex: 1;
}


.header h1 {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.amp-guide {
    background: rgba(42, 63, 95, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    max-width: 600px;
    backdrop-filter: blur(10px);
}

.amp-guide h3 {
    color: #00d4ff;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.guide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.guide-method {
    padding: 15px;
    background: rgba(26, 31, 58, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.guide-method h4 {
    color: #00d4ff;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.guide-method ol {
    margin: 0;
    padding-left: 18px;
    color: #b0b8d0;
    font-size: 13px;
    line-height: 1.5;
}

.guide-method li {
    margin-bottom: 6px;
}

.guide-method strong {
    color: #e0e0e0;
    font-weight: 600;
}

@media (max-width: 800px) {
    .guide-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.footer {
    position: fixed;
    bottom: 10px;
    right: 20px;
    font-size: 12px;
    color: #8892b0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.footer:hover {
    opacity: 1;
}

.footer a {
    color: #00d4ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Input Tabs */
.input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(42, 63, 95, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border-color: transparent;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* PDF Upload Styles */
.pdf-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.pdf-upload-area {
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(26, 31, 58, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pdf-upload-area:hover,
.pdf-upload-area.dragover {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(26, 31, 58, 0.8);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text p {
    margin: 5px 0;
    color: #e0e0e0;
}

.upload-text p:first-child {
    font-size: 16px;
    color: #00d4ff;
}

.upload-text p:last-child {
    font-size: 14px;
    color: #8892b0;
}

.pdf-selected {
    border-color: #00ff88 !important;
    background: rgba(0, 255, 136, 0.1) !important;
}

.pdf-selected .upload-icon {
    color: #00ff88;
}

.pdf-selected .upload-text p:first-child {
    color: #00ff88;
}

.statement-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.statement-textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    background: rgba(26, 31, 58, 0.8);
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 80px;
    max-height: 300px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.statement-textarea:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.statement-textarea::placeholder {
    color: #8892b0;
    font-style: italic;
}

.parse-button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    align-self: flex-start;
}

.parse-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.parse-button:active {
    transform: translateY(0);
}

.fee-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}

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

.fee-item span:first-child {
    color: #8892b0;
    font-size: 13px;
}

.fee-item span:last-child {
    color: #ffa502;
    font-size: 13px;
    font-weight: 500;
}

.currency-card {
    position: relative;
}

.currency-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(136, 146, 176, 0.2);
}

.currency-details small {
    color: #8892b0;
    font-size: 11px;
    line-height: 1.2;
}

.main-content {
    flex: 1;
    display: flex;
    gap: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}

.dashboard {
    flex: 0 0 600px;
    background: #1a1f3a;
    border-radius: 0;
    border-right: 2px solid #2a3f5f;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    height: 100vh;
    overflow-y: auto;
}

.dashboard h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #00d4ff;
}

.client-info-dashboard {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(42, 63, 95, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.client-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.client-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.client-label {
    font-size: 11px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.client-value {
    font-size: 13px;
    font-weight: 600;
    color: #00d4ff;
}

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

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

.stat-card {
    background: rgba(42, 63, 95, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 18px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.stat-label {
    font-size: 14px;
    color: #8892b0;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-value.small {
    font-size: 22px;
}

.positive {
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.negative {
    color: #ff4757;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
}

.neutral {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.warning {
    color: #ffa502;
    text-shadow: 0 0 20px rgba(255, 165, 2, 0.5);
}

.trades-container {
    flex: 1;
    background: #1a1f3a;
    border-radius: 0;
    padding: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

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

.trades-header h2 {
    font-size: 20px;
    color: #00d4ff;
}

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

.filter-btn {
    padding: 8px 16px;
    background: rgba(42, 63, 95, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border-color: transparent;
    color: white;
}

.trades-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.trades-table {
    width: 100%;
    background: rgba(26, 31, 58, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 100px 60px 80px 50px 1fr 80px 50px;
    gap: 1px;
    background: rgba(0, 212, 255, 0.1);
    padding: 12px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.table-row {
    display: grid;
    grid-template-columns: 80px 100px 60px 80px 50px 1fr 80px 50px;
    gap: 1px;
    padding: 10px 8px;
    font-size: 13px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background: rgba(0, 212, 255, 0.05);
}

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

.buy-side {
    border-left: 3px solid #00ff88;
}

.sell-side {
    border-left: 3px solid #ff4757;
}

.col-date {
    color: #8892b0;
    font-family: 'Courier New', monospace;
}

.col-number {
    color: #00d4ff;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.col-market {
    color: #ffa502;
    font-weight: 500;
}

.col-side {
    font-weight: 600;
}

.buy-side .col-side {
    color: #00ff88;
}

.sell-side .col-side {
    color: #ff4757;
}

.col-qty {
    text-align: center;
    font-weight: 500;
    color: #e0e0e0;
}

.col-contract {
    color: #b0b8d0;
}

.col-price {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #e0e0e0;
}

.col-ccy {
    text-align: center;
    color: #8892b0;
    font-size: 11px;
}

.trades-list::-webkit-scrollbar {
    width: 8px;
}

.trades-list::-webkit-scrollbar-track {
    background: rgba(42, 63, 95, 0.3);
    border-radius: 4px;
}

.trades-list::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

.trade-item {
    background: rgba(42, 63, 95, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.trade-item:hover {
    background: rgba(42, 63, 95, 0.5);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.3);
}

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

.trade-symbol {
    font-size: 18px;
    font-weight: 600;
    color: #00d4ff;
}

.trade-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.buy {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.sell {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.4);
}

.trade-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.trade-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 12px 0;
    padding: 10px;
    background: rgba(26, 31, 58, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.trade-number-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trade-number-label {
    font-size: 10px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.trade-number-value {
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    font-family: 'Courier New', monospace;
}

.trade-number-arrow {
    font-size: 16px;
    color: #00d4ff;
    font-weight: bold;
}

.trade-detail {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
}

.trade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(136, 146, 176, 0.2);
}

.trade-time {
    font-size: 12px;
    color: #8892b0;
}

.trade-profit {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profit-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profit-gross {
    font-size: 16px;
}

.profit-fees {
    font-size: 12px;
    color: #ffa502;
}

.profit-net {
    font-size: 14px;
    padding-top: 4px;
    border-top: 1px solid rgba(136, 146, 176, 0.3);
    margin-top: 4px;
}

.profit-ticks {
    font-size: 12px;
    color: #8892b0;
    margin-top: 2px;
}

.position-item {
    border-left: 4px solid transparent;
}

.position-item[data-status="completed"] {
    border-left-color: #00d4ff;
}

.position-item .trade-profit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.position-item .profit-gross {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.position-item .profit-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.long {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.short {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.4);
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #8892b0;
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #00d4ff;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stat-separator {
    height: 1px;
    background: rgba(0, 212, 255, 0.2);
    margin: 20px 0;
}

/* Responsive Design für Stats und Trade Positions Grid */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard {
        flex: 0 0 500px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 70px 90px 50px 70px 40px 1fr 70px 40px;
        font-size: 12px;
    }
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    
    .header {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #2a3f5f;
        flex-direction: row;
        height: auto;
    }
    
    .main-content {
        flex-direction: row;
        height: calc(100vh - 200px);
    }
    
    .dashboard {
        height: 100%;
        border-right: 2px solid #2a3f5f;
    }
    
    .trades-container {
        height: 100%;
    }
}

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .dashboard {
        flex: none;
        border-right: none;
        border-bottom: 2px solid #2a3f5f;
        height: auto;
    }
    
    .trades-container {
        height: 50vh;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 60px 80px 40px 60px 35px 1fr 60px 35px;
        font-size: 11px;
        padding: 8px 6px;
    }
}

@media (max-width: 600px) {
    .table-header,
    .table-row {
        grid-template-columns: 50px 70px 35px 50px 30px 1fr 50px 30px;
        font-size: 10px;
        padding: 6px 4px;
    }
    
    .table-header {
        font-size: 9px;
    }
}