.wallet-manager {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wallet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.wallets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s;
}

.wallet-item:hover {
    background: #e9ecef;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.wallet-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    min-width: 150px;
}

.chain-icon {
    font-size: 20px;
}

.wallet-address {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.wallet-address a {
    color: #007bff;
    text-decoration: none;
}

.wallet-address a:hover {
    text-decoration: underline;
}

.wallet-chain {
    color: #6c757d;
    font-size: 14px;
    min-width: 100px;
}

.wallet-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state p {
    margin: 8px 0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #343a40;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-group input.error {
    border-color: #dc3545;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.validating {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

.info-box {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 12px;
    margin: 20px 0;
}

.info-box p {
    margin: 4px 0;
    font-size: 14px;
    color: #495057;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Custom Token Management Styles */
.header-actions {
    display: flex;
    gap: 12px;
}

.modal-large {
    max-width: 700px;
}

.token-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.token-form-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.token-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.custom-tokens-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.custom-tokens-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s;
}

.custom-token-item:hover {
    background: #e9ecef;
}

.token-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.token-symbol {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
    min-width: 60px;
}

.token-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.token-name {
    font-size: 14px;
    color: #495057;
}

.token-chain {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

.token-address {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #6c757d;
}

/* === Dark Mode === */

/* Container and items */
.dark .wallet-manager {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark .wallet-header h3 {
    color: #f3f4f6;
}

.dark .wallet-item {
    background: #111827;
}

.dark .wallet-item:hover {
    background: #374151;
}

.dark .wallet-label {
    color: #f3f4f6;
}

.dark .wallet-address a {
    color: #60a5fa;
}

.dark .wallet-chain {
    color: #9ca3af;
}

/* Empty state */
.dark .wallet-manager .empty-state {
    color: #9ca3af;
}

/* Modal */
.dark .modal-content {
    background: #1f2937;
}

.dark .modal-header {
    border-bottom-color: #374151;
}

.dark .modal-header h3 {
    color: #f3f4f6;
}

.dark .close-btn {
    color: #9ca3af;
}

.dark .close-btn:hover {
    color: #f3f4f6;
}

.dark .modal-footer {
    border-top-color: #374151;
}

/* Forms */
.dark .form-group label {
    color: #d1d5db;
}

.dark .form-group input,
.dark .form-group select {
    background: #111827;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark .form-group input:focus,
.dark .form-group select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

.dark .form-group input.error {
    border-color: #f87171;
}

.dark .error-message {
    color: #f87171;
}

.dark .validating {
    color: #9ca3af;
}

/* Info box */
.dark .info-box {
    background: #111827;
    border-left-color: #60a5fa;
}

.dark .info-box p {
    color: #d1d5db;
}

/* Loading */
.dark .wallet-manager .loading {
    color: #9ca3af;
}

/* Token sections */
.dark .token-form-section {
    border-bottom-color: #374151;
}

.dark .token-form-section h4 {
    color: #f3f4f6;
}

.dark .custom-tokens-section h4 {
    color: #f3f4f6;
}

/* Custom token items */
.dark .custom-token-item {
    background: #111827;
}

.dark .custom-token-item:hover {
    background: #374151;
}

.dark .token-symbol {
    color: #f3f4f6;
}

.dark .token-name {
    color: #d1d5db;
}

.dark .token-chain {
    color: #9ca3af;
}

.dark .token-address {
    color: #9ca3af;
}

/* Secondary button dark variant */
.dark .btn-secondary {
    background: #4b5563;
}

.dark .btn-secondary:hover:not(:disabled) {
    background: #6b7280;
}