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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

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

.modal-content {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    min-width: 320px;
}

.modal-content h2 {
    color: #4ecca3;
    margin-bottom: 10px;
}

.modal-content p {
    color: #888;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-content input:focus {
    outline: none;
    border-color: #4ecca3;
}

.modal-content button {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #4ecca3;
    color: #1a1a2e;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: #3db892;
}

.error-msg {
    color: #ff6b6b;
    margin-top: 15px;
    font-size: 0.9rem;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logout-btn {
    padding: 8px 20px;
    border: 1px solid #ff6b6b;
    border-radius: 4px;
    background: transparent;
    color: #ff6b6b;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #ff6b6b;
    color: #1a1a2e;
}

h1 {
    font-size: 2rem;
    color: #4ecca3;
}

h3 {
    color: #4ecca3;
    margin-bottom: 15px;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-filter label {
    color: #888;
}

.date-filter input {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a2e;
    color: #e0e0e0;
}

.date-filter button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    background: #4ecca3;
    color: #1a1a2e;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.date-filter button:hover {
    background: #3db892;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
}

.card-value.positive {
    color: #ff6b6b;
}

.card-value.negative {
    color: #4ecca3;
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tables */
.table-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    color: #4ecca3;
    font-weight: 600;
    text-align: right;
}

th:first-child, td:first-child {
    text-align: left;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.positive-value {
    color: #ff6b6b;
}

.negative-value {
    color: #4ecca3;
}

.buy {
    color: #ff6b6b;
}

.sell {
    color: #4ecca3;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .charts {
        grid-template-columns: 1fr;
    }

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