:root {
    --bg-color: #000000;
    --card-bg: #1c1c1e;
    --modal-bg: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --profit-green: #00c805;
    --loss-red: #ff3b30;
    --accent-blue: #007aff;
    --border-color: #2c2c2e;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Header */
.main-header {
    display: flex;
    align-items: center;
    padding: 16px;
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 10;
}

.back-btn {
    margin-right: 16px;
    cursor: pointer;
}

.main-header h1 {
    font-size: 19px;
    font-weight: 700;
    flex-grow: 1;
    text-align: center;
    margin-right: 40px;
}

/* Tabs */
.tabs-container {
    display: flex;
    padding: 0 16px;
    position: relative;
    margin-bottom: 12px;
}

.tab {
    padding: 12px 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}

.tab.active {
    color: var(--text-primary);
}

.tab-indicator {
    position: absolute;
    bottom: 2px;
    left: 20px;
    width: 100px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
}

/* Filters */
.filters-container {
    display: flex;
    padding: 8px 16px;
    gap: 8px;
}

.filter-btn {
    display: flex;
    align-items: center;
    background-color: #1c1c1e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    gap: 4px;
}

.filter-btn svg {
    opacity: 0.6;
}

/* Summary Card */
.summary-card {
    background-color: #1c1c1e;
    margin: 8px 16px 16px;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-row .label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-row .value {
    font-size: 15px;
    font-weight: 700;
    color: var(--loss-red);
}

.summary-row .value.positive {
    color: var(--profit-green);
}

/* Trade List */
.trade-list {
    display: flex;
    flex-direction: column;
}

.trade-item {
    background-color: var(--bg-color);
    padding: 16px;
    border-bottom: 0.5px solid #1c1c1e;
}

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

.symbol-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: contain; /* Better for custom PNGs */
    background-color: transparent;
}

.symbol-name {
    font-size: 19px;
    font-weight: 800;
    flex-grow: 1;
}

.status-badge {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge svg {
    opacity: 0.8;
}

.trade-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-label.dotted {
    border-bottom: 1px dotted var(--text-secondary);
}

.detail-value {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.closing-pnl {
    font-weight: 800;
    font-size: 16px;
}

.closing-pnl.positive { color: var(--profit-green); }
.closing-pnl.negative { color: var(--loss-red); }

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #1c1c1e;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #2c2c2e;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input, .form-group select {
    width: 100%;
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-cancel, .btn-submit {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.btn-delete {
    background-color: var(--loss-red);
    color: white;
}

.btn-cancel {
    background-color: #3a3a3c;
    color: white;
}

.btn-submit {
    background-color: var(--accent-blue);
    color: white;
}
