body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-container h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    text-align: left;
    letter-spacing: -0.02em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    grid-template-areas: 
        "info settings"
        "transactions transactions";
    gap: 20px;
}

.dashboard-info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-actions {
    grid-area: settings;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.transactions-section {
    grid-area: transactions;
    width: 100%;
    margin-top: 20px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dashboard-card-header {
    padding: 16px 24px;
    background: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
}

.dashboard-card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #1d1d1f;
}

.dashboard-card-content {
    padding: 20px 24px;
    flex: 1;
}

.dashboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-list-item {
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
}

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

.truncated-text {
    position: relative;
    overflow: hidden;
    line-height: 1.5;
    color: #333;
}

.dashboard-meta {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #86868b;
}

.dashboard-meta-item {
    margin-right: 12px;
}

.dashboard-meta-item:last-child {
    margin-right: 0;
}

.dashboard-source {
    font-weight: 500;
    color: #555;
}

.dashboard-date {
    color: #86868b;
}

.dashboard-bar-container {
    margin: 16px 0;
}

.dashboard-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #515154;
}

.dashboard-bar-bg {
    width: 100%;
    height: 8px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
}

.dashboard-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.dashboard-bar-fill.positive {
    background: linear-gradient(90deg, #34c759, #30d158);
}

.dashboard-bar-fill.neutral {
    background: linear-gradient(90deg, #ffcc00, #ffd60a);
}

.dashboard-bar-fill.negative {
    background: linear-gradient(90deg, #ff453a, #ff3b30);
}

.news-section {
    grid-column: span 1;
}

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.news-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
    line-height: 1.3;
}

.news-card-summary {
    font-size: 0.95rem;
    color: #515154;
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.5;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #86868b;
    margin-top: auto;
}

.news-card-source {
    font-weight: 500;
}

.forecast-section,
.sentiment-card {
    width: 100%;
}

.forecast-direction {
    margin: 16px 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.forecast-reasoning {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #515154;
}

.sentiment-summary {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #515154;
}

.sentiment-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
}

.sentiment-label.positive {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.sentiment-label.neutral {
    background-color: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
}

.sentiment-label.negative {
    background-color: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.trade-alert {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: rgba(0, 122, 255, 0.1);
    border-radius: 8px;
    color: #007aff;
    font-weight: 500;
}

/* Trading settings styles */
.trading-settings {
    grid-column: span 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.trading-settings h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1d1d1f;
}

.trading-settings-group {
    margin-bottom: 24px;
}

.trading-settings-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 0.95rem;
}

.trading-settings-group input[type="text"],
.trading-settings-group input[type="number"],
.trading-settings-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.trading-settings-group input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.trading-settings-help {
    font-size: 0.85rem;
    color: #86868b;
    margin-top: 6px;
}

.trading-settings-help.warning {
    color: #ff453a;
}

.trading-settings-credentials-status {
    margin-top: 12px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e6e6e6;
    transition: .4s;
    border-radius: 28px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #0071e3;
}

.toggle-switch input:disabled + label {
    background-color: #d2d2d7;
    cursor: not-allowed;
}

.toggle-switch input:checked + label:before {
    transform: translateX(22px);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "info"
            "settings"
            "transactions";
    }
    
    .dashboard-data-sources {
        grid-template-columns: 1fr;
    }
}

/* Wallet Section Styles */
.wallet-section {
    width: 100%;
}

.wallet-empty-message {
    padding: 12px;
    background-color: #f8f8f8;
    border-radius: 8px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    }

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    border: 1px solid #e6e6e6;
    transition: all 0.2s ease;
}

.wallet-item.selected {
    background-color: rgba(0, 113, 227, 0.1);
    border-color: #0071e3;
}

.wallet-item:hover {
    border-color: #0071e3;
}

.wallet-item-content {
    flex: 1;
}

.wallet-item-label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #1d1d1f;
}

.wallet-item-address {
    font-size: 0.9rem;
    color: #86868b;
    margin-bottom: 4px;
    font-family: monospace;
}

.wallet-item-chain {
    font-size: 0.85rem;
    color: #515154;
}

.wallet-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background-color: #e6e6e6;
    color: #86868b;
    font-size: 1.2rem;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-item-remove:hover {
    background-color: #ff453a;
    color: white;
}

.wallet-add-form {
    margin-bottom: 24px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 12px;
}

.wallet-add-form h4 {
    margin-top: 0;
    margin-bottom: 16px;
}

.wallet-add-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: white;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.wallet-add-form select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.wallet-add-button {
    margin-top: 12px;
    padding: 12px 20px;
    background-color: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-add-button:hover {
    background-color: #0061c9;
}

.wallet-trading-settings {
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 12px;
}

.wallet-trading-settings h4 {
    margin-top: 0;
    margin-bottom: 16px;
}

.wallet-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.wallet-refresh-button {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #515154;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-refresh-button:hover {
    background-color: #eaeaea;
    border-color: #ccc;
}

.wallet-refresh-button:active {
    transform: scale(0.98);
}

.token-holdings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.token-holding-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f8f8;
    border-radius: 6px;
    gap: 10px;
}

.token-symbol {
    font-weight: 600;
    color: #1d1d1f;
    padding-right: 10px;
}

.token-name {
    font-size: 0.9rem;
    color: #515154;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-balance {
    font-weight: 500;
    color: #1d1d1f;
    text-align: right;
}

/* Price-based trading section */
.price-based-trading-section {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.price-trading-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.price-history-section {
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.price-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
}

.price-history-item {
    display: flex;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.price-history-token {
    font-weight: bold;
    min-width: 80px;
    padding-right: 10px;
    border-right: 1px solid #eee;
    display: flex;
    align-items: center;
}

.price-history-details {
    flex: 1;
    padding-left: 10px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-history-details strong {
    color: #2a5786;
}

/* Update data sources container for vertical layout */
.dashboard-data-sources {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

/* Make sure the data section cards take full width */
.dashboard-data-sources .dashboard-card {
    width: 100%;
}

/* Transaction table styles */
.transaction-table-container {
    overflow-x: auto;
    width: 100%;
}

.transaction-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

.transaction-table th, 
.transaction-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.transaction-table th {
    background-color: #f8f8f8;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.transaction-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.transaction-buy {
    border-left: 4px solid #4caf50;
}

.transaction-sell {
    border-left: 4px solid #f44336;
}

/* Update dashboard header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e6e6e6;
}

/* Style status indicators */
.dashboard-status-indicators {
    display: flex;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-indicator::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.connected {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.status-indicator.connected::before {
    background-color: #34c759;
}

.status-indicator.disconnected {
    background-color: rgba(255, 69, 58, 0.1);
    color: #ff453a;
}

.status-indicator.disconnected::before {
    background-color: #ff453a;
}

/* Add styles for trading mode buttons */
.trading-mode-selector {
    display: flex;
    gap: 10px;
}

.trading-mode-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background-color: #f8f8f8;
    font-size: 0.95rem;
    font-weight: 500;
    color: #515154;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trading-mode-btn.active {
    background-color: #0071e3;
    color: white;
    border-color: #0071e3;
}

.trading-mode-btn:hover:not(.active) {
    background-color: #e6e6e6;
} 