.wallet-manager {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.wallet-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 80px;
}

.wallet-list-header {
    margin-bottom: 1.5rem;
}

.wallet-list-header h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.add-wallet-form {
    display: flex;
    gap: 0.5rem;
}

.add-wallet-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.add-wallet-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.add-wallet-form button {
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.add-wallet-form button:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

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

.wallet-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.wallet-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.wallet-list li:hover .wallet-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.6;
    transition: all 0.2s;
}

.action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.delete-asset {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0;
    transition: all 0.2s;
}

.asset-info:hover .delete-asset {
    opacity: 0.6;
}

.delete-asset:hover {
    opacity: 1;
    color: #dc3545;
    transform: scale(1.1);
}

.wallet-list li:hover {
    background: var(--background-color);
}

.wallet-list li.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(42,113,208,0.2);
}

.wallet-content {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 1.5rem;
}

.wallet-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wallet-info h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.wallet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat {
    background: var(--background-color);
    padding: 1.25rem;
    border-radius: 8px;
}

.stat .label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.stat .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.wallet-charts {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-container {
    height: 250px;
    margin-top: 1rem;
}

.wallet-assets {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.assets-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.assets-header h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.add-asset-form {
    display: grid;
    grid-template-columns: 1fr 120px 120px auto;
    gap: 0.75rem;
    align-items: start;
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 0.5rem;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.autocomplete-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    align-items: center;
    transition: background-color 0.2s;
}

.autocomplete-item:hover {
    background: var(--background-color);
}

.coin-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.coin-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.coin-symbol {
    font-weight: 600;
    color: var(--secondary-color);
}

.coin-name {
    font-size: 0.85rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

.coin-price {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.add-asset-form input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.add-asset-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.add-asset-form button {
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.add-asset-form button:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

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

.asset-info {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.asset-info:last-child {
    border-bottom: none;
}

.asset-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.asset-info .symbol {
    font-weight: 600;
    color: var(--secondary-color);
}

.asset-info .amount {
    color: var(--secondary-color);
    opacity: 0.8;
    text-align: right;
}

.asset-info .value {
    font-weight: 500;
    color: var(--secondary-color);
    text-align: right;
    min-width: 120px;
}

.asset-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.asset-details .name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.asset-numbers {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.asset-profit {
    min-width: 150px;
    text-align: right;
}

.wallet-overview {
    margin-top: 2rem;
}

.wallet-overview h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.wallets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.wallet-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wallet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wallet-card h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.wallet-card-stats {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.card-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-stat .value {
    font-weight: 500;
    color: var(--secondary-color);
}

.wallet-list li .fa-chart-pie {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .wallet-manager {
        grid-template-columns: 1fr;
    }

    .add-asset-form {
        grid-template-columns: 1fr;
    }

    .asset-info {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .asset-info .amount,
    .asset-info .value {
        grid-column: 2;
        text-align: left;
    }
}
