:root {
    --bg-primary: #f7f9fc;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --accent-primary: #5a67d8;
    --accent-success: #48bb78;
    --accent-danger: #f56565;
    --accent-warning: #ed8936;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Login Page - Simple Two-Sided Layout */
.login-page {
    min-height: 100vh;
    display: flex;
    background: #ffffff;
}

/* Left Side - Waves Background */
.login-left {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.waves-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50% 50% 0 0;
}

.wave-1 {
    height: 60%;
    bottom: -10%;
    background: rgba(255, 255, 255, 0.15);
}

.wave-2 {
    height: 40%;
    bottom: -5%;
    background: rgba(255, 255, 255, 0.1);
}

.wave-3 {
    height: 30%;
    bottom: 0;
    background: rgba(255, 255, 255, 0.08);
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    margin: 0;
}

/* Right Side - Login Form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Button Styling */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* Error Message */
.error-message {
    min-height: 1.5rem;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.footer-text {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
    }
    
    .login-left {
        flex: none;
        height: 40vh;
        min-height: 300px;
    }
    
    .login-right {
        flex: 1;
        padding: 2rem 1rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-icon {
        font-size: 3rem;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .login-left {
        height: 35vh;
        min-height: 250px;
    }
    
    .brand-title {
        font-size: 1.75rem;
    }
    
    .brand-icon {
        font-size: 2.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .login-form-container {
        max-width: 100%;
    }
}







/* Dark mode for login */
body:has(.login-container) {
    background: #0a0a0a;
}

/* Portfolio Page */
.portfolio-container {
    min-height: 100vh;
    background: var(--bg-primary);
}

.portfolio-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.username {
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fee;
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.portfolio-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.dashboard-card.total-value {
    grid-column: span 1;
}

.dashboard-card.chart-card {
    grid-column: span 1;
}

.dashboard-card.stats-card {
    grid-column: span 1;
}

@media (min-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: 300px 1fr 250px;
    }
}

.dashboard-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.dashboard-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.dashboard-change {
    font-size: 1rem;
    font-weight: 500;
}

.dashboard-change.positive {
    color: var(--accent-success);
}

.dashboard-change.negative {
    color: var(--accent-danger);
}

.chart-container {
    height: 200px;
    position: relative;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.stat-name {
    color: var(--text-secondary);
}

.stat-val {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-val.positive {
    color: var(--accent-success);
}

.stat-val.negative {
    color: var(--accent-danger);
}

.stat-val.warning {
    color: var(--accent-warning);
}

/* Token Grid */
.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Token Card - Complete Design */
.token-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.token-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

.token-card.alert {
    border-color: var(--accent-warning);
}

.token-card.target-reached {
    border-color: var(--accent-success);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.card-value {
    margin: 0.5rem 0;
}

.value-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.value-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.value-change.positive {
    color: var(--accent-success);
}

.value-change.negative {
    color: var(--accent-danger);
}

.card-progress {
    margin: 0.5rem 0;
}

.progress-track {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5a67d8 0%, #667eea 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Take Profit Levels */
.tp-levels {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tp-header {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.tp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.tp-item.active {
    background: #fed7aa;
}

.tp-name {
    font-weight: 500;
    color: var(--text-primary);
}

.tp-price {
    color: var(--text-secondary);
    margin-left: auto;
    margin-right: 0.5rem;
}

.tp-status {
    width: 1rem;
    text-align: center;
}

.tp-status.active {
    color: var(--accent-warning);
}

.tp-status.passed {
    color: var(--accent-success);
}

/* Loading */
.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 4rem;
    font-size: 1rem;
}

/* Error Messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee;
    border: 1px solid #fca5a5;
    color: var(--accent-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-actions {
        justify-content: space-between;
    }

    .portfolio-main {
        padding: 1rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        grid-column: span 1 !important;
    }

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